From 9536d65230eb3fae2790bd2fb1fe5905dcd96eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 26 Jul 2024 02:13:56 +0200 Subject: [PATCH] main: Don't pass `--seed` for `zig run`. --- src/main.zig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.zig b/src/main.zig index ddd2e79f4406..9db3a693bf91 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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);