From b62534dbf1fddbea4d3e86fcfa87dca21a90e2c8 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 19 Jun 2024 20:57:53 -0400 Subject: fix(task): do not propagate env changes outside subshells (#24279) * https://github.com/denoland/deno_task_shell/pull/120 --- cli/tools/task.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tools/task.rs') diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 6b18e18bb..a44dc8dbb 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -367,7 +367,7 @@ impl ShellCommand for NpmCommand { } // fallback to running the real npm command - let npm_path = match context.resolve_command_path("npm") { + let npm_path = match context.state.resolve_command_path("npm") { Ok(path) => path, Err(err) => { let _ = context.stderr.write_line(&format!("{}", err)); @@ -388,7 +388,7 @@ impl ShellCommand for NpxCommand { mut context: ShellCommandContext, ) -> LocalBoxFuture<'static, ExecuteResult> { if let Some(first_arg) = context.args.first().cloned() { - if let Some(command) = context.state.resolve_command(&first_arg) { + if let Some(command) = context.state.resolve_custom_command(&first_arg) { let context = ShellCommandContext { args: context.args.iter().skip(1).cloned().collect::>(), ..context @@ -396,7 +396,7 @@ impl ShellCommand for NpxCommand { command.execute(context) } else { // can't find the command, so fallback to running the real npx command - let npx_path = match context.resolve_command_path("npx") { + let npx_path = match context.state.resolve_command_path("npx") { Ok(npx) => npx, Err(err) => { let _ = context.stderr.write_line(&format!("{}", err)); -- cgit v1.2.3