diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-10-15 17:42:19 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-15 17:44:10 -0700 |
| commit | 09a250c531afb95f475d6834a50f1aecc4761b39 (patch) | |
| tree | 4289a3e3243c60354a0fa25f44065516823e4648 /src | |
| parent | dfce396cf865e5cc05f46f3079e25c5acb98a4c3 (diff) | |
| download | zig-09a250c531afb95f475d6834a50f1aecc4761b39.tar.gz zig-09a250c531afb95f475d6834a50f1aecc4761b39.zip | |
adjust error message of zig run with no args
previously it said "one source file" which was not correct
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig index a4c2f4f47b..433d64925d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1266,11 +1266,13 @@ fn buildOutputType( } if (root_src_file == null and arg_mode == .zig_test) { - fatal("one zig source file is required to run `zig test`", .{}); + fatal("`zig test` expects a zig source file argument", .{}); } - if (link_objects.items.len == 0 and root_src_file == null and c_source_files.items.len == 0 and arg_mode == .run) { - fatal("one source file is required to run `zig run`", .{}); + if (link_objects.items.len == 0 and root_src_file == null and + c_source_files.items.len == 0 and arg_mode == .run) + { + fatal("`zig run` expects at least one positional argument", .{}); } const root_name = if (provided_name) |n| n else blk: { |
