Skip to content

Commit 02204e8

Browse files
authored
Merge pull request #18 from SamuelSchepp/feature/custom-path
Adds support for custom env
2 parents 899d5d7 + c6176d9 commit 02204e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export const dockerCommand = async (
174174
options: IOptions = {
175175
currentWorkingDirectory: undefined,
176176
echo: true,
177+
env: undefined,
177178
machineName: undefined,
178179
},
179180
) => {
@@ -192,6 +193,7 @@ export const dockerCommand = async (
192193
DEBUG: "",
193194
HOME: process.env.HOME,
194195
PATH: process.env.PATH,
196+
...options.env,
195197
},
196198
maxBuffer: 200 * 1024 * 1024,
197199
};
@@ -236,6 +238,7 @@ export class Docker {
236238
private options: IOptions = {
237239
currentWorkingDirectory: undefined,
238240
echo: true,
241+
env: undefined,
239242
machineName: undefined,
240243
},
241244
) {}
@@ -249,12 +252,14 @@ export interface IOptions {
249252
machineName?: string;
250253
currentWorkingDirectory?: string;
251254
echo?: boolean;
255+
env?: NodeJS.ProcessEnv;
252256
}
253257

254258
export class Options implements IOptions {
255259
public constructor(
256260
public machineName?: string,
257261
public currentWorkingDirectory?: string,
258262
public echo: boolean = true,
263+
public env?: NodeJS.ProcessEnv,
259264
) {}
260265
}

0 commit comments

Comments
 (0)