This commit is contained in:
Michael H
2025-02-06 00:12:23 +11:00
committed by GitHub
parent b898442d8b
commit c225c12e82

View File

@@ -4832,13 +4832,13 @@ pub const Interpreter = struct {
}
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;
}
this.writeFailingError("bun: command not found: {s}\n", .{first_arg});
return;
};
};