1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(task): do not propagate env changes outside subshells (#24279)

* https://github.com/denoland/deno_task_shell/pull/120
This commit is contained in:
David Sherret 2024-06-19 20:57:53 -04:00 committed by GitHub
parent 293a36f98d
commit b62534dbf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

4
Cargo.lock generated
View file

@ -1864,9 +1864,9 @@ dependencies = [
[[package]]
name = "deno_task_shell"
version = "0.16.1"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97e5ff66a1e89edb7ca0c36b73a8fcdc008ba426c4ad7a36e1dfb3f4a166179e"
checksum = "dd6413ffc1654cad015edb5c4ab574069acdc929a6efafed23bc947901bcff1a"
dependencies = [
"anyhow",
"futures",

View file

@ -75,7 +75,7 @@ deno_lockfile.workspace = true
deno_npm = "=0.21.4"
deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_semver = "=0.5.6"
deno_task_shell = "=0.16.1"
deno_task_shell = "=0.17.0"
deno_terminal.workspace = true
eszip = "=0.71.0"
napi_sym.workspace = true

View file

@ -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::<Vec<_>>(),
..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));