mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
check without .exe (#10362)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user