mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
fix argv parsing on windows (#8458)
* fix argv parsing on windows * directly use zig stdlib * remove debug comments, fix double deinit * change bun.argv() to return slices, not null-terminated pointers * fix test on windows to escape file paths correctly --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -89,10 +89,9 @@ pub const InitCommand = struct {
|
||||
entry_point: string = "",
|
||||
};
|
||||
|
||||
pub fn exec(alloc: std.mem.Allocator, argv: [][*:0]u8) !void {
|
||||
pub fn exec(alloc: std.mem.Allocator, argv: [][:0]u8) !void {
|
||||
const print_help = brk: {
|
||||
for (argv) |arg_| {
|
||||
const arg = bun.span(arg_);
|
||||
for (argv) |arg| {
|
||||
if (strings.eqlComptime(arg, "--help")) {
|
||||
break :brk true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user