Skip to content

Commit

Permalink
fix?: remove SEAMSTRESS_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
robbielyman committed Jan 3, 2025
1 parent be94e9d commit 250a2d0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ fn setEnvironmentVariables(allocator: std.mem.Allocator) !EnvBlockType {
try map.put(key, value);
}
}
if (map.get("SEAMSTRESS_HOME") == null) {
const home = map.get("HOME") orelse {
std.debug.print(
\\$HOME and $SEAMSTRESS_HOME undefined!
\\define $SEAMSTRESS_HOME and try again
\\
, .{});
std.process.exit(1);
};
const seamstress_home = try std.fs.path.join(allocator, &.{ home, "seamstress" });
defer allocator.free(seamstress_home);
try map.put("SEAMSTRESS_HOME", seamstress_home);
}
// if (map.get("SEAMSTRESS_HOME") == null) {
// const home = map.get("HOME") orelse {
// std.debug.print(
// \\$HOME and $SEAMSTRESS_HOME undefined!
// \\define $SEAMSTRESS_HOME and try again
// \\
// , .{});
// std.process.exit(1);
// };
// const seamstress_home = try std.fs.path.join(allocator, &.{ home, "seamstress" });
// defer allocator.free(seamstress_home);
// try map.put("SEAMSTRESS_HOME", seamstress_home);
// }
return switch (builtin.os.tag) {
.windows => try std.process.createWindowsEnvBlock(allocator, &map),
.macos, .linux => try std.process.createEnvironFromMap(allocator, &map, .{}),
Expand Down

0 comments on commit 250a2d0

Please sign in to comment.