Fix Windows cross-compilation missing executable permissions (#21268)

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
robobun
2025-07-21 19:47:00 -07:00
committed by GitHub
parent 171169a237
commit cd54db1e4b
3 changed files with 8 additions and 4 deletions

View File

@@ -718,6 +718,10 @@ pub const StandaloneModuleGraph = struct {
cleanup(zname, cloned_executable_fd);
Global.exit(1);
};
// Set executable permissions when running on POSIX hosts, even for Windows targets
if (comptime !Environment.isWindows) {
_ = bun.c.fchmod(cloned_executable_fd.native(), 0o777);
}
return cloned_executable_fd;
},
else => {