summaryrefslogtreecommitdiff
path: root/src/Surface.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Surface.zig')
-rw-r--r--src/Surface.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Surface.zig b/src/Surface.zig
index 13436f9ff..3bee52196 100644
--- a/src/Surface.zig
+++ b/src/Surface.zig
@@ -519,17 +519,18 @@ pub fn init(
// This separate block ({}) is important because our errdefers must
// be scoped here to be valid.
{
- var env_ = rt_surface.defaultTermioEnv() catch |err| env: {
+ var env = rt_surface.defaultTermioEnv() catch |err| env: {
// If an error occurs, we don't want to block surface startup.
log.warn("error getting env map for surface err={}", .{err});
- break :env null;
+ break :env internal_os.getEnvMap(alloc) catch
+ std.process.EnvMap.init(alloc);
};
- errdefer if (env_) |*env| env.deinit();
+ errdefer env.deinit();
// Initialize our IO backend
var io_exec = try termio.Exec.init(alloc, .{
.command = command,
- .env = env_,
+ .env = env,
.shell_integration = config.@"shell-integration",
.shell_integration_features = config.@"shell-integration-features",
.working_directory = config.@"working-directory",