aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api')
-rw-r--r--src/bun.js/api/bun/spawn.zig19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/bun.js/api/bun/spawn.zig b/src/bun.js/api/bun/spawn.zig
index 58dac9e9f..c1deebd3a 100644
--- a/src/bun.js/api/bun/spawn.zig
+++ b/src/bun.js/api/bun/spawn.zig
@@ -4,14 +4,19 @@ const string = bun.string;
const std = @import("std");
fn _getSystem() type {
- if (comptime bun.Environment.isLinux) {
- return struct {
- pub usingnamespace std.os.system;
- pub usingnamespace bun.C.linux;
- };
- }
+ // this is a workaround for a Zig stage1 bug
+ // the "usingnamespace" is evaluating in dead branches
+ return brk: {
+ if (comptime bun.Environment.isLinux) {
+ const Type = bun.C.linux;
+ break :brk struct {
+ pub usingnamespace std.os.system;
+ pub usingnamespace Type;
+ };
+ }
- return std.os.system;
+ break :brk std.os.system;
+ };
}
const system = _getSystem();