From 6c867c34d73f348675eec286eb2b745bebe3eab9 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 28 Dec 2021 03:15:53 -0800 Subject: [PATCH] Fix edgecase in `bun create` tasks --- src/cli/create_command.zig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cli/create_command.zig b/src/cli/create_command.zig index 7672ce9b92..4430bd52bb 100644 --- a/src/cli/create_command.zig +++ b/src/cli/create_command.zig @@ -116,12 +116,8 @@ fn execTask(allocator: *std.mem.Allocator, task_: string, cwd: string, PATH: str } if (strings.startsWith(task, "bun ")) { - // TODO: use self exe - if (bun_path orelse which(&bun_path_buf, PATH, cwd, "bun")) |bun_path_| { - bun_path = bun_path_; - argv = argv[npm_args..]; - argv[0] = std.mem.span(bun_path_); - } + argv[1] = argv[0]; + argv = argv[1..]; } Output.pretty("\n$", .{});