Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alow standalone bun executable to use local bun instance in Bun.$ #16829

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
?
  • Loading branch information
RiskyMH committed Feb 3, 2025
commit 97984890f7e6094d1617f0729806a4152ae14280
10 changes: 5 additions & 5 deletions src/shell/interpreter.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4831,11 +4831,11 @@ pub const Interpreter = struct {
break :blk bun.selfExePath() catch break :blk2;
}

if (bun.strings.eqlComptime(first_arg_real, "bunx")) blk2: {
spawn_args.env_array.append(arena_allocator, "BUN_SKIP_STANDALONE_MODULE_GRAPH=1") catch break :blk2;
this.args.insert(1, "x") catch bun.outOfMemory();
break :blk bun.selfExePath() catch break :blk2;
}
// if (bun.strings.eqlComptime(first_arg_real, "bunx")) blk2: {
// spawn_args.env_array.append(arena_allocator, "BUN_SKIP_STANDALONE_MODULE_GRAPH=1") catch break :blk2;
// this.args.insert(1, "x") catch bun.outOfMemory();
// break :blk bun.selfExePath() catch break :blk2;
// }

break :blk which(path_buf, spawn_args.PATH, spawn_args.cwd, first_arg_real) orelse {
this.writeFailingError("bun: command not found: {s}\n", .{first_arg});
Expand Down