Skip to content

Commit

Permalink
fix(tasks): fixes exec
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Mar 25, 2021
1 parent e0e6c66 commit f3df732
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tasks/process/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export function exec(
): Task.Async {
const opts = Object.assign({ extendEnv: true }, options || undefined);
return async (ctx: Context): Promise<void> => {
const fullArgs = (args || []).concat(ctx.args || []);

into(
ctx,
log('debug', `Exec: ${file}`, args && args.length ? args : undefined)
log('debug', `Exec: ${file}`, fullArgs.length ? fullArgs : undefined)
);

const isStdioTty =
Expand All @@ -31,7 +33,7 @@ export function exec(
const pipeOutput = !opts.stdio && prefix;
const forceColor = pipeOutput && isStdioTty;

const ps = execa(file, (args || []).concat(ctx.args), {
const ps = execa(file, fullArgs, {
...options,
extendEnv: false,
cwd: opts.cwd || ctx.cwd,
Expand Down

0 comments on commit f3df732

Please sign in to comment.