diff options
author | 2022-03-04 00:20:22 -0800 | |
---|---|---|
committer | 2022-03-04 00:20:22 -0800 | |
commit | 51fbbea1d3dc2b610fe5fe525229e56b581e5c8a (patch) | |
tree | c75e063c4eb7c99737fbf7a5a2014f9546e2e218 /src/cli/run_command.zig | |
parent | 696710fd7aedee6054947aab002aaa853e9ee731 (diff) | |
download | bun-jarred/upgrade-zig-2.tar.gz bun-jarred/upgrade-zig-2.tar.zst bun-jarred/upgrade-zig-2.zip |
upgrade zigjarred/upgrade-zig-2
Diffstat (limited to 'src/cli/run_command.zig')
-rw-r--r-- | src/cli/run_command.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index 8a8451cea..e1e4bf22c 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -591,7 +591,7 @@ pub const RunCommand = struct { var file_path = script_name_to_search; const file_: std.fs.File.OpenError!std.fs.File = brk: { if (script_name_to_search[0] == std.fs.path.sep) { - break :brk std.fs.openFileAbsolute(script_name_to_search, .{ .read = true }); + break :brk std.fs.openFileAbsolute(script_name_to_search, .{ .mode = .read_only }); } else { const cwd = std.os.getcwd(&path_buf) catch break :possibly_open_with_bun_js; path_buf[cwd.len] = std.fs.path.sep; @@ -605,7 +605,7 @@ pub const RunCommand = struct { if (file_path.len == 0) break :possibly_open_with_bun_js; path_buf2[file_path.len] = 0; var file_pathZ = path_buf2[0..file_path.len :0]; - break :brk std.fs.openFileAbsoluteZ(file_pathZ, .{ .read = true }); + break :brk std.fs.openFileAbsoluteZ(file_pathZ, .{ .mode = .read_only }); } }; @@ -925,7 +925,7 @@ pub const RunCommand = struct { if (path_for_which.len > 0) { if (which(&path_buf, path_for_which, this_bundler.fs.top_level_dir, script_name_to_search)) |destination| { - // var file = std.fs.openFileAbsoluteZ(destination, .{ .read = true }) catch |err| { + // var file = std.fs.openFileAbsoluteZ(destination, .{ .mode = .read_only }) catch |err| { // if (!log_errors) return false; // Output.prettyErrorln("<r>error: <red>{s}<r> opening file: \"{s}\"", .{ err, std.mem.span(destination) }); |