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 => {

View File

@@ -1,5 +1,3 @@
const bun = @import("bun");
pub const CustomGetterSetter = opaque {
pub fn isGetterNull(this: *CustomGetterSetter) bool {
return bun.cpp.JSC__CustomGetterSetter__isGetterNull(this);
@@ -9,3 +7,5 @@ pub const CustomGetterSetter = opaque {
return bun.cpp.JSC__CustomGetterSetter__isSetterNull(this);
}
};
const bun = @import("bun");

View File

@@ -1,8 +1,8 @@
const bun = @import("bun");
/// Opaque representation of a JavaScript source provider
pub const SourceProvider = opaque {
pub fn deref(provider: *SourceProvider) void {
bun.cpp.JSC__SourceProvider__deref(provider);
}
};
const bun = @import("bun");