aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-09-11 17:19:21 -0700
committerGravatar GitHub <noreply@github.com> 2023-09-11 17:19:21 -0700
commitca461f9e83b2c692442bb7e20c2f9e3670d2ef6a (patch)
tree5128e56522c5c309ba6885648622e354c45a2e31 /src/bun.js
parent9c4765f6167967f42afec3ce521776cafa9037ec (diff)
downloadbun-ca461f9e83b2c692442bb7e20c2f9e3670d2ef6a.tar.gz
bun-ca461f9e83b2c692442bb7e20c2f9e3670d2ef6a.tar.zst
bun-ca461f9e83b2c692442bb7e20c2f9e3670d2ef6a.zip
fix loading env from `.env.production` and friends (#4630)
* reload conditional vars * test * change `get` and `put` methods * dont clone empty env variables
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/api/bun.zig2
-rw-r--r--src/bun.js/javascript.zig2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index 36e52821f..966c82d38 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -4431,7 +4431,7 @@ pub const EnvironmentVariables = struct {
var vm = globalObject.bunVM();
var sliced = name.toSlice(vm.allocator);
defer sliced.deinit();
- const value = vm.bundler.env.map.map.get(sliced.slice()) orelse return null;
+ const value = vm.bundler.env.map.get(sliced.slice()) orelse return null;
return ZigString.initUTF8(value);
}
};
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index 0d73c31c5..752fcb3a4 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -670,7 +670,7 @@ pub const VirtualMachine = struct {
}
if (map.map.fetchSwapRemove("BUN_INTERNAL_IPC_FD")) |kv| {
- if (std.fmt.parseInt(i32, kv.value, 10) catch null) |fd| {
+ if (std.fmt.parseInt(i32, kv.value.value, 10) catch null) |fd| {
this.initIPCInstance(fd);
} else {
Output.printErrorln("Failed to parse BUN_INTERNAL_IPC_FD", .{});