diff options
Diffstat (limited to 'test/image_harness.zig')
| -rw-r--r-- | test/image_harness.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/image_harness.zig b/test/image_harness.zig index 390c14e8..bd465e1c 100644 --- a/test/image_harness.zig +++ b/test/image_harness.zig @@ -40,6 +40,10 @@ pub fn main(init: std.process.Init) !void { if (libc.mkdir(base, 0o755) != 0 and libc.errno(-1) != .EXIST) return error.MkdirFailed; defer cleanupBase(arena, base); _ = setenv("HOME", base, 1); + // Do not let an exported developer XDG_CONFIG_HOME style or mutate the + // native process under test; this nonexistent directory is test-owned. + const config_home = try std.fmt.allocPrintSentinel(arena, "{s}/.config", .{base}, 0); + _ = setenv("XDG_CONFIG_HOME", config_home, 1); _ = setenv("HISTFILE", "/dev/null", 1); _ = setenv("TERM", "xterm-256color", 1); _ = setenv("LC_ALL", "C", 1); |
