summaryrefslogtreecommitdiff
path: root/cli/tools
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/tools
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/tools')
-rw-r--r--cli/tools/task.rs12
1 files changed, 8 insertions, 4 deletions
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