Skip to content

Commit

Permalink
maybe pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RiskyMH committed Feb 5, 2025
1 parent d8b5f60 commit b898442
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cli.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ pub const Command = struct {
// bun build --compile entry point
if (try bun.StandaloneModuleGraph.fromExecutable(bun.default_allocator)) |graph| {
bun.is_standalone = true;

context_data = .{
.args = std.mem.zeroes(Api.TransformOptions),
.log = log,
Expand Down
12 changes: 6 additions & 6 deletions src/shell/interpreter.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4831,14 +4831,14 @@ pub const Interpreter = struct {
break :blk bun.selfExePath() catch break :blk2;
}

if (bun.strings.eqlComptime(first_arg_real, "bunx")) blk2: {
if (bun.is_standalone == true) spawn_args.env_array.append(arena_allocator, "BUN_SKIP_STANDALONE_MODULE_GRAPH=1") catch break :blk2;
this.args.insert(1, "x") catch break :blk2;
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});

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

0 comments on commit b898442

Please sign in to comment.