diff options
| author | 2022-10-18 20:11:17 -0700 | |
|---|---|---|
| committer | 2022-10-18 20:11:17 -0700 | |
| commit | 1835e4b9f93ba9324bca2bed588f42c93a2772de (patch) | |
| tree | 70707afdc82e736a3b7eb3818e22019104b81264 /src | |
| parent | 8ca49f906acdd4f8bdb9f42c6b5c47b098308dcd (diff) | |
| download | bun-1835e4b9f93ba9324bca2bed588f42c93a2772de.tar.gz bun-1835e4b9f93ba9324bca2bed588f42c93a2772de.tar.zst bun-1835e4b9f93ba9324bca2bed588f42c93a2772de.zip | |
get args fix (#1346)
* fix args.len < capacity check
* tests for args
* file name change
* switch to stdout.writer, use JSON for parsing
* bun-debug or bun
* missing arg
Diffstat (limited to 'src')
| -rw-r--r-- | src/bun.js/node/types.zig | 1 | ||||
| -rw-r--r-- | src/cli/test_command.zig | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bun.js/node/types.zig b/src/bun.js/node/types.zig index 693e4e19e..5e54066b9 100644 --- a/src/bun.js/node/types.zig +++ b/src/bun.js/node/types.zig @@ -1841,6 +1841,7 @@ pub const Process = struct { vm.argv.len + 2, ) 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 diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index 77b2493d5..88942c012 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -327,7 +327,7 @@ pub const TestCommand = struct { js_ast.Expr.Data.Store.create(default_allocator); js_ast.Stmt.Data.Store.create(default_allocator); var vm = try JSC.VirtualMachine.init(ctx.allocator, ctx.args, null, ctx.log, env_loader); - vm.argv = ctx.positionals; + vm.argv = ctx.passthrough; try vm.bundler.configureDefines(); vm.bundler.options.rewrite_jest_for_tests = true; |
