diff options
author | 2022-09-20 23:57:07 -0700 | |
---|---|---|
committer | 2022-09-20 23:57:07 -0700 | |
commit | ef1607c08849494d737f34994f3007016ea9020d (patch) | |
tree | 28f20174863ddae611a75fc6bf280bae73616d1a | |
parent | 123e8c8d2b2e96c6e63031af9cd8d22917d9d410 (diff) | |
download | bun-ef1607c08849494d737f34994f3007016ea9020d.tar.gz bun-ef1607c08849494d737f34994f3007016ea9020d.tar.zst bun-ef1607c08849494d737f34994f3007016ea9020d.zip |
fixup
-rw-r--r-- | src/bun.js/node/types.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bun.js/node/types.zig b/src/bun.js/node/types.zig index 9dfb19c5f..e54cda08f 100644 --- a/src/bun.js/node/types.zig +++ b/src/bun.js/node/types.zig @@ -1814,8 +1814,9 @@ pub const Process = struct { args_list.appendAssumeCapacity( JSC.ZigString.init( - // cheap way to get the first argument - arg0).withEncoding(), + // cheap way to get the first argument + bun.span(arg0), + ).withEncoding(), ); } @@ -1825,7 +1826,7 @@ pub const Process = struct { defer allocator.free(args); { for (vm.argv) |arg0| { - const argv0 = JSC.ZigString.init(std.mem.span(arg0)).withEncoding(); + const argv0 = JSC.ZigString.init(arg0).withEncoding(); // https://github.com/yargs/yargs/blob/adb0d11e02c613af3d9427b3028cc192703a3869/lib/utils/process-argv.ts#L1 args_list.appendAssumeCapacity(argv0); } |