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

v run: simplify

This commit is contained in:
pancake 2020-04-15 16:17:17 +02:00 committed by GitHub
parent c0491285f8
commit caed4aad58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,13 +184,12 @@ fn parse_args(args []string) (&pref.Preferences, string) {
}
else if command == 'run' {
res.is_run = true
if command_pos + 1 < args.len {
res.path = args[command_pos + 1]
res.run_args = args[command_pos+2..]
} else {
if command_pos > args.len {
eprintln('v run: no v files listed')
exit(1)
}
res.path = args[command_pos + 1]
res.run_args = args[command_pos+2..]
}
if command == 'build-module' {
res.build_mode = .build_module