Skip to content

Commit

Permalink
fix 7665:
Browse files Browse the repository at this point in the history
only add self exe path when testing
  • Loading branch information
g-w1 authored and andrewrk committed Jan 3, 2021
1 parent fb37c1b commit 3d151fb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1853,9 +1853,16 @@ fn buildOutputType(
else => unreachable,
}
}
try argv.appendSlice(&[_][]const u8{
exe_path, self_exe_path,
});
// when testing pass the zig_exe_path to argv
if (arg_mode == .zig_test)
try argv.appendSlice(&[_][]const u8{
exe_path, self_exe_path,
})
// when running just pass the current exe
else
try argv.appendSlice(&[_][]const u8{
exe_path,
});
} else {
for (test_exec_args.items) |arg| {
if (arg) |a| {
Expand Down

0 comments on commit 3d151fb

Please sign in to comment.