From 7957ec318652f74a3c6393adc63698f84bf01469 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 11 Aug 2019 18:02:01 +0300 Subject: [PATCH] v install: fix installing a single module --- compiler/main.v | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/main.v b/compiler/main.v index 18295822d4..57f5defa8a 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -126,19 +126,19 @@ fn main() { return } if 'install' in args { - if args.len <= 3 { + if args.len < 3 { println('usage: v install [module] [module] [...]') return } names := args.slice(2, args.len) - vroot := os.dir(os.executable()) - vget := '$vroot/tools/vget' + vexec := os.executable() + vroot := os.dir(vexec) + vget := '$vroot/tools/vget' if true { //println('Building vget...') - os.chdir(vroot + '/tools') - vexec := os.args[0] - _ := os.exec('$vexec vget.v') or { + os.chdir(vroot + '/tools') + _ := os.exec('$vexec -o $vget vget.v') or { panic(err) } }