mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.exe: clone the repo on first launch
This commit is contained in:
parent
0c8afdfe13
commit
688bbcff9c
@ -782,7 +782,15 @@ fn new_v(args[]string) *V {
|
||||
println('Setting VROOT to "$lang_dir".')
|
||||
os.write_file(TmpPath + '/VROOT', lang_dir)
|
||||
} else {
|
||||
println('Please do it from "v/compiler" directory.')
|
||||
println('V repo not found. Cloning...')
|
||||
os.mv('v', 'v.bin')
|
||||
os.system('git clone https://github.com/vlang/v')
|
||||
if !os.dir_exists('v') {
|
||||
println('failed to clone github.com/vlang/v')
|
||||
exit(1)
|
||||
}
|
||||
os.mv('v.bin', 'v/compiler/v')
|
||||
println('Re-launch V from v/compiler')
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user