diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-10-03 17:27:09 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-03 17:27:09 -0700 |
| commit | b306149b22aa7bdf9b02cce788406452926a88c4 (patch) | |
| tree | 5146f208d739840b095b89d04bd9c9bf19f51ffa /src/main.zig | |
| parent | a2b86777b536a71216628a052faf5a184e63fd33 (diff) | |
| download | zig-b306149b22aa7bdf9b02cce788406452926a88c4.tar.gz zig-b306149b22aa7bdf9b02cce788406452926a88c4.zip | |
`zig run foo.c` is perfectly valid
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 32ce3995c5..0868839257 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1210,8 +1210,8 @@ fn buildOutputType( fatal("translate-c expects exactly 1 source file (found {})", .{c_source_files.items.len}); } - if (root_src_file == null and (arg_mode == .zig_test or arg_mode == .run)) { - fatal("one zig source file is required to run this command", .{}); + if (root_src_file == null and arg_mode == .zig_test) { + fatal("one zig source file is required to run `zig test`", .{}); } const root_name = if (provided_name) |n| n else blk: { |
