aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/node/types.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bun.js/node/types.zig b/src/bun.js/node/types.zig
index e54cda08f..838c6e2e2 100644
--- a/src/bun.js/node/types.zig
+++ b/src/bun.js/node/types.zig
@@ -1809,12 +1809,14 @@ pub const Process = struct {
) catch unreachable;
var args_list = std.ArrayListUnmanaged(JSC.ZigString){ .items = args, .capacity = args.len };
args_list.items.len = 0;
+
+ // get the bun executable
+ // without paying the cost of a syscall to resolve the full path
if (std.process.args().next()) |arg0| {
std.debug.assert(arg0.len > 0);
args_list.appendAssumeCapacity(
JSC.ZigString.init(
- // cheap way to get the first argument
bun.span(arg0),
).withEncoding(),
);