authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-03 17:27:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-03 17:27:09-07:00
logb306149b22aa7bdf9b02cce788406452926a88c4
tree5146f208d739840b095b89d04bd9c9bf19f51ffa
parenta2b86777b536a71216628a052faf5a184e63fd33

`zig run foo.c` is perfectly valid


1 files changed, 2 insertions(+), 2 deletions(-)

src/main.zig+2-2
...@@ -1210,8 +1210,8 @@ fn buildOutputType(...@@ -1210,8 +1210,8 @@ fn buildOutputType(
1210 fatal("translate-c expects exactly 1 source file (found {})", .{c_source_files.items.len});1210 fatal("translate-c expects exactly 1 source file (found {})", .{c_source_files.items.len});
1211 }1211 }
12121212
1213 if (root_src_file == null and (arg_mode == .zig_test or arg_mode == .run)) {1213 if (root_src_file == null and arg_mode == .zig_test) {
1214 fatal("one zig source file is required to run this command", .{});1214 fatal("one zig source file is required to run `zig test`", .{});
1215 }1215 }
12161216
1217 const root_name = if (provided_name) |n| n else blk: {1217 const root_name = if (provided_name) |n| n else blk: {