vself: fix `v self` (it compiled to cmd/v/v without -o)

pull/6635/head
Delyan Angelov 2020-10-16 15:05:57 +03:00
parent 7471e1fd05
commit 3af700d950
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ fn main() {
self_idx := os.args.index('self') self_idx := os.args.index('self')
args := os.args[1..self_idx] args := os.args[1..self_idx]
jargs := args.join(' ') jargs := args.join(' ')
obinary := cmdline.option(args, '-o', 'v') obinary := cmdline.option(args, '-o', '')
sargs := if obinary != '' { jargs } else { '$jargs -o v2 ' } sargs := if obinary != '' { jargs } else { '$jargs -o v2 ' }
cmd := '$vexe $sargs cmd/v' cmd := '$vexe $sargs cmd/v'
options := if args.len > 0 { '($sargs)' } else { '' } options := if args.len > 0 { '($sargs)' } else { '' }