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

cmd/v: fix run

This commit is contained in:
Alexander Medvednikov
2020-04-07 01:09:25 +02:00
parent b7560fe4bf
commit 33644a4f91
2 changed files with 8 additions and 2 deletions

View File

@@ -47,8 +47,8 @@ fn main() {
return
}
prefs, command := parse_args(args)
//println('main() command = $command')
if prefs.is_verbose {
println('command = "$command"')
println(util.full_v_version())
}
if prefs.is_verbose {
@@ -168,6 +168,12 @@ fn parse_args(args []string) (&pref.Preferences, string) {
if command.ends_with('.v') || os.exists(command) {
res.path = command
}
else if command == 'run' {
res.path = args[args.len-1]
}
if res.is_verbose {
println('setting pref.path to "$res.path"')
}
res.fill_with_defaults()
return res, command
}