diff options
author | 2022-09-20 23:57:45 -0700 | |
---|---|---|
committer | 2022-09-20 23:57:45 -0700 | |
commit | c01cba3ab5baddc19fd2d3bee4b1e8f58738f299 (patch) | |
tree | 561e25337abf16ce97983990cd8a709d8b70d950 | |
parent | ef1607c08849494d737f34994f3007016ea9020d (diff) | |
download | bun-c01cba3ab5baddc19fd2d3bee4b1e8f58738f299.tar.gz bun-c01cba3ab5baddc19fd2d3bee4b1e8f58738f299.tar.zst bun-c01cba3ab5baddc19fd2d3bee4b1e8f58738f299.zip |
Update types.zig
-rw-r--r-- | src/bun.js/node/types.zig | 4 |
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(), ); |