check without .exe (#10362)

This commit is contained in:
Dylan Conway
2024-04-18 17:03:38 -07:00
committed by GitHub
parent 213461adc6
commit 246df1f43e

View File

@@ -1235,14 +1235,14 @@ pub const Command = struct {
pub fn isBunX(argv0: []const u8) bool {
if (Environment.isWindows) {
return strings.endsWithComptime(argv0, "bunx.exe");
return strings.endsWithComptime(argv0, "bunx.exe") or strings.endsWithComptime(argv0, "bunx");
}
return strings.endsWithComptime(argv0, "bunx");
}
pub fn isNode(argv0: []const u8) bool {
if (Environment.isWindows) {
return strings.endsWithComptime(argv0, "node.exe");
return strings.endsWithComptime(argv0, "node.exe") or strings.endsWithComptime(argv0, "node");
}
return strings.endsWithComptime(argv0, "node");
}