Skip to content

Commit

Permalink
Merge pull request #18 from SamuelSchepp/feature/custom-path
Browse files Browse the repository at this point in the history
Adds support for custom env
  • Loading branch information
mattqs authored Oct 16, 2020
2 parents 899d5d7 + c6176d9 commit 02204e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const dockerCommand = async (
options: IOptions = {
currentWorkingDirectory: undefined,
echo: true,
env: undefined,
machineName: undefined,
},
) => {
Expand All @@ -192,6 +193,7 @@ export const dockerCommand = async (
DEBUG: "",
HOME: process.env.HOME,
PATH: process.env.PATH,
...options.env,
},
maxBuffer: 200 * 1024 * 1024,
};
Expand Down Expand Up @@ -236,6 +238,7 @@ export class Docker {
private options: IOptions = {
currentWorkingDirectory: undefined,
echo: true,
env: undefined,
machineName: undefined,
},
) {}
Expand All @@ -249,12 +252,14 @@ export interface IOptions {
machineName?: string;
currentWorkingDirectory?: string;
echo?: boolean;
env?: NodeJS.ProcessEnv;
}

export class Options implements IOptions {
public constructor(
public machineName?: string,
public currentWorkingDirectory?: string,
public echo: boolean = true,
public env?: NodeJS.ProcessEnv,
) {}
}

1 comment on commit 02204e8

@rcfja
Copy link

@rcfja rcfja commented on 02204e8 Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I actually use this? do you have a usage example?

Please sign in to comment.