From d7b73dd4fcbfad3750affdfaa6ab1717864f2f28 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Mon, 19 Dec 2022 23:37:53 -0800 Subject: [PATCH] Use endsWith --- src/cli.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli.zig b/src/cli.zig index 068a276c3f..1c01592dbc 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -729,6 +729,7 @@ pub const HelpCommand = struct { }; pub fn printWithReason(comptime reason: Reason) void { + // the spacing between commands here is intentional const fmt = \\> run ./my-script.ts Run JavaScript with bun, a package.json script, or a bin \\> x bun-repl Install and execute a package bin (bunx) @@ -891,7 +892,7 @@ pub const Command = struct { const argv0 = args_iter.next() orelse return .HelpCommand; // symlink is argv[0] - if (strings.eqlComptime(argv0, "bunx")) + if (strings.endsWithComptime(argv0, "bunx")) return .BunxCommand; var next_arg = ((args_iter.next()) orelse return .AutoCommand);