mirror of
https://github.com/ziglang/zig.git
synced 2025-12-18 12:13:20 +00:00
adjust error message of zig run with no args
previously it said "one source file" which was not correct
This commit is contained in:
parent
dfce396cf8
commit
09a250c531
@ -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: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user