File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
237
237
}
238
238
res.run_only = os.getenv ('VTEST_ONLY_FN' ).split_any (',' )
239
239
mut command := ''
240
- mut command_pos := 0
240
+ mut command_pos := - 1
241
241
// for i, arg in args {
242
242
for i := 0 ; i < args.len; i++ {
243
243
arg := args[i]
@@ -289,6 +289,10 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
289
289
res.is_help = true
290
290
}
291
291
'-v' {
292
+ if command_pos != - 1 {
293
+ // a -v flag after the command, is intended for the command, not for V itself
294
+ continue
295
+ }
292
296
// `-v` flag is for setting verbosity, but without any args it prints the version, like Clang
293
297
if args.len > 1 {
294
298
res.is_verbose = true
You can’t perform that action at this time.
0 commit comments