aboutsummaryrefslogtreecommitdiff
path: root/src/standalone_bun.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-14 06:31:17 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-14 06:31:17 -0700
commit2a66229b0f9aabf96891afe3063e07ec877527ca (patch)
treeb12f22083d24daca784934b9a91c8b13bab99e0e /src/standalone_bun.zig
parent688637d835f0e92089574cda4054f5bfd84331d7 (diff)
downloadbun-2a66229b0f9aabf96891afe3063e07ec877527ca.tar.gz
bun-2a66229b0f9aabf96891afe3063e07ec877527ca.tar.zst
bun-2a66229b0f9aabf96891afe3063e07ec877527ca.zip
fixup
Diffstat (limited to 'src/standalone_bun.zig')
-rw-r--r--src/standalone_bun.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/standalone_bun.zig b/src/standalone_bun.zig
index 3e42b5040..9c3d48ee6 100644
--- a/src/standalone_bun.zig
+++ b/src/standalone_bun.zig
@@ -214,14 +214,14 @@ pub const StandaloneModuleGraph = struct {
}
// otherwise, just copy the file
- const fd = switch (bun.JSC.Node.Syscall.open(zname, std.os.O.CLOEXEC | std.os.O.RDONLY | std.os.O.CREAT, 0)) {
+ const fd = switch (bun.JSC.Node.Syscall.open(zname, std.os.O.CLOEXEC | std.os.O.WRONLY | std.os.O.CREAT, 0)) {
.result => |res| res,
.err => |err| {
Output.prettyErrorln("<r><red>error<r><d>:<r> failed to open temporary file to copy bun into: {s}", .{err.toSystemError().message.slice()});
Global.exit(1);
},
};
- const self_fd = switch (bun.JSC.Node.Syscall.open(self_exeZ, std.os.O.CLOEXEC | std.os.O.WRONLY, 0)) {
+ const self_fd = switch (bun.JSC.Node.Syscall.open(self_exeZ, std.os.O.CLOEXEC | std.os.O.RDONLY, 0)) {
.result => |res| res,
.err => |err| {
Output.prettyErrorln("<r><red>error<r><d>:<r> failed to open bun executable to copy from as read-only: {s}", .{err.toSystemError().message.slice()});