mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 23:06:20 +00:00
@@ -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",
|
||||
|
Reference in New Issue
Block a user