1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v: show an error and exit, when no module name is given in v build-module (#10338)

This commit is contained in:
zakuro 2021-06-05 00:30:43 +09:00 committed by GitHub
parent 117295e1f3
commit b0c9a87292
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -634,6 +634,10 @@ pub fn parse_args(known_external_commands []string, args []string) (&Preferences
} }
if command == 'build-module' { if command == 'build-module' {
res.build_mode = .build_module res.build_mode = .build_module
if command_pos + 1 >= args.len {
eprintln('v build-module: no module specified')
exit(1)
}
res.path = args[command_pos + 1] res.path = args[command_pos + 1]
} }
// keep only the unique res.build_options: // keep only the unique res.build_options: