ww build: honor Go output permission modes
This commit is contained in:
@@ -302,8 +302,10 @@ export fn main(argc: i32, argv: **u8) i32 = {
|
||||
return 1;
|
||||
};
|
||||
|
||||
// Pinned Go's BuildInstallFunc creates an ordinary linked command with
|
||||
// 0o777; open applies the invoking process's umask to this fresh stage.
|
||||
let flags: os.flag = os.flag.WRONLY | os.flag.CREATE | os.flag.TRUNC;
|
||||
let fd: i32 = os.open(pathstr(outpath), flags, 493i32); // 0o755
|
||||
let fd: i32 = os.open(pathstr(outpath), flags, 511i32); // 0o777
|
||||
if (fd < 0) {
|
||||
let m: str = "w6l: cannot open output\n";
|
||||
os.write(2, m.ptr, m.len: u64);
|
||||
|
||||
Reference in New Issue
Block a user