From 246df1f43eebb489acef551728713150dc09928b Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:03:38 -0700 Subject: [PATCH] check without .exe (#10362) --- src/cli.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli.zig b/src/cli.zig index da192d9737..b85e6e4863 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -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"); }