Skip to content

Commit

Permalink
main: Don't pass --seed for zig run.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp authored and andrewrk committed Jul 26, 2024
1 parent afddfe2 commit 9536d65
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4314,10 +4314,12 @@ fn runOrTest(
defer argv.deinit();

if (test_exec_args.len == 0) {
try argv.appendSlice(&.{
exe_path,
try std.fmt.allocPrint(arena, "--seed=0x{x}", .{std.crypto.random.int(u32)}),
});
try argv.append(exe_path);
if (arg_mode == .zig_test) {
try argv.append(
try std.fmt.allocPrint(arena, "--seed=0x{x}", .{std.crypto.random.int(u32)}),
);
}
} else {
for (test_exec_args) |arg| {
try argv.append(arg orelse exe_path);
Expand Down

0 comments on commit 9536d65

Please sign in to comment.