| ... | ... | @@ -1266,7 +1266,13 @@ fn buildOutputType( |
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | 1268 | if (root_src_file == null and arg_mode == .zig_test) { |
| 1269 | | fatal("one zig source file is required to run `zig test`", .{}); |
| 1269 | fatal("`zig test` expects a zig source file argument", .{}); |
| 1270 | } |
| 1271 | |
| 1272 | if (link_objects.items.len == 0 and root_src_file == null and |
| 1273 | c_source_files.items.len == 0 and arg_mode == .run) |
| 1274 | { |
| 1275 | fatal("`zig run` expects at least one positional argument", .{}); |
| 1270 | 1276 | } |
| 1271 | 1277 | |
| 1272 | 1278 | const root_name = if (provided_name) |n| n else blk: { |