Skip to content

Commit

Permalink
feat: add env? to option
Browse files Browse the repository at this point in the history
  • Loading branch information
khuongduybui authored Mar 26, 2022
1 parent a085580 commit 1b9e7b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ interface IOptions {
verbose?: boolean;
continueOnError?: boolean;
cwd?: string;
env?: {
[key: string]: string;
};
}

export const exec = async (
Expand All @@ -61,6 +64,9 @@ export const exec = async (
if (options.cwd) {
execOptions.cwd = options.cwd;
}
if (options.env) {
execOptions.env = options.env;
}
let p = Deno.run(execOptions);

let response = "";
Expand Down

0 comments on commit 1b9e7b3

Please sign in to comment.