mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pref: remove duplicate flag "build"
This commit is contained in:
parent
1f74f83bc6
commit
10168d307e
@ -395,7 +395,7 @@ pub fn parse_args(args []string) (&Preferences, string) {
|
||||
command_pos = i
|
||||
continue
|
||||
}
|
||||
if command !in ['', 'build', 'build-module'] {
|
||||
if command !in ['', 'build-module'] {
|
||||
// arguments for e.g. fmt should be checked elsewhere
|
||||
continue
|
||||
}
|
||||
@ -415,13 +415,6 @@ pub fn parse_args(args []string) (&Preferences, string) {
|
||||
}
|
||||
if command.ends_with('.v') || os.exists(command) {
|
||||
res.path = command
|
||||
} else if command == 'build' {
|
||||
if command_pos + 2 != args.len {
|
||||
eprintln('`v build` requires exactly one argument - either a single .v file, or a single folder/ containing several .v files')
|
||||
exit(1)
|
||||
}
|
||||
res.path = args[command_pos + 1]
|
||||
must_exist(res.path)
|
||||
} else if command == 'run' {
|
||||
res.is_run = true
|
||||
if command_pos + 2 > args.len {
|
||||
|
Loading…
Reference in New Issue
Block a user