diff options
author | 2021-12-27 22:19:47 -0800 | |
---|---|---|
committer | 2021-12-27 22:19:47 -0800 | |
commit | 266870fee86f11efabc7ef9081344d48173504b5 (patch) | |
tree | 1073b44aadbdacc42251adec08ad5e5c97806cf9 | |
parent | ca5245bb9b61b2a307912e2c35296f9b8d446cf6 (diff) | |
download | bun-266870fee86f11efabc7ef9081344d48173504b5.tar.gz bun-266870fee86f11efabc7ef9081344d48173504b5.tar.zst bun-266870fee86f11efabc7ef9081344d48173504b5.zip |
add oom workaround
-rw-r--r-- | src/cli/add_completions.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cli/add_completions.zig b/src/cli/add_completions.zig index 7a3fb38d0..c2b2b3e19 100644 --- a/src/cli/add_completions.zig +++ b/src/cli/add_completions.zig @@ -1,5 +1,6 @@ pub const add_completions: []const u8 = @embedFile("add_completions.txt"); const std = @import("std"); +const Environment = @import("../env.zig"); pub const FirstLetter = enum(u8) { a = 'a', @@ -31,7 +32,7 @@ pub const FirstLetter = enum(u8) { }; pub const Index = std.EnumArray(FirstLetter, []const []const u8); -pub const index: Index = brk: { +pub const index: Index = if (Environment.isDebug) Index.initFill(&.{}) else brk: { var array: Index = Index.initFill(&[_][]const u8{}); var i: u8 = 'a'; |