summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-03-27 13:19:25 -0400
committerGitHub <noreply@github.com>2024-03-27 13:19:25 -0400
commit624e3a04e7eb92d5ce3536cec653d7aae92df5b5 (patch)
tree76c34bea6d61030ab70fd5ec6251a38d8bb103ba /cli
parent726ddabf1f6a7edf5ab68c30ca87f0f3c605b6de (diff)
feat(task): cross-platform shebang support (#23091)
Adds cross-platform shebang support (supports using shebangs in `deno task` on Windows) https://github.com/denoland/deno_task_shell/pull/113
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml2
-rw-r--r--cli/tools/task.rs12
2 files changed, 9 insertions, 5 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index c252cd9b1..12a45aa43 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -74,7 +74,7 @@ deno_lockfile.workspace = true
deno_npm = "=0.17.0"
deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_semver = "=0.5.4"
-deno_task_shell = "=0.15.0"
+deno_task_shell = "=0.16.0"
deno_terminal.workspace = true
eszip = "=0.64.2"
napi_sym.workspace = true
diff --git a/cli/tools/task.rs b/cli/tools/task.rs
index 124d760db..8f500df34 100644
--- a/cli/tools/task.rs
+++ b/cli/tools/task.rs
@@ -299,8 +299,10 @@ impl ShellCommand for NpmPackageBinCommand {
},
];
args.extend(context.args);
- let executable_command =
- deno_task_shell::ExecutableCommand::new("deno".to_string());
+ let executable_command = deno_task_shell::ExecutableCommand::new(
+ "deno".to_string(),
+ std::env::current_exe().unwrap(),
+ );
executable_command.execute(ShellCommandContext { args, ..context })
}
}
@@ -324,8 +326,10 @@ impl ShellCommand for NodeModulesFileRunCommand {
self.path.to_string_lossy().to_string(),
];
args.extend(context.args);
- let executable_command =
- deno_task_shell::ExecutableCommand::new("deno".to_string());
+ let executable_command = deno_task_shell::ExecutableCommand::new(
+ "deno".to_string(),
+ std::env::current_exe().unwrap(),
+ );
// set this environment variable so that the launched process knows the npm command name
context
.state