download vlib if it is missing
parent
2aa6ab71db
commit
aaba7fdb29
|
@ -883,9 +883,17 @@ fn new_v(args[]string) &V {
|
||||||
//println('VROOT=$vroot')
|
//println('VROOT=$vroot')
|
||||||
// v.exe's parent directory should contain vlib
|
// v.exe's parent directory should contain vlib
|
||||||
if !os.dir_exists(vroot) || !os.dir_exists(vroot + '/vlib/builtin') {
|
if !os.dir_exists(vroot) || !os.dir_exists(vroot + '/vlib/builtin') {
|
||||||
println('vlib not found. It should be next to the V executable. ')
|
println('vlib not found, downloading it...')
|
||||||
println('Go to https://vlang.io to install V.')
|
ret := os.system('git clone --depth=1 https://github.com/vlang/v .')
|
||||||
exit(1)
|
if ret != 0 {
|
||||||
|
println('failed to `git clone` vlib')
|
||||||
|
println('make sure you are online and have git installed')
|
||||||
|
exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
//println('vlib not found. It should be next to the V executable. ')
|
||||||
|
//println('Go to https://vlang.io to install V.')
|
||||||
|
//exit(1)
|
||||||
}
|
}
|
||||||
//println('out_name:$out_name')
|
//println('out_name:$out_name')
|
||||||
mut out_name_c := os.realpath( out_name ) + '.tmp.c'
|
mut out_name_c := os.realpath( out_name ) + '.tmp.c'
|
||||||
|
|
Loading…
Reference in New Issue