mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: fix panicing on a failing make in v up
, or recompilation of vup.v
This commit is contained in:
@@ -41,7 +41,7 @@ fn main() {
|
|||||||
app.backup('cmd/tools/vup.exe')
|
app.backup('cmd/tools/vup.exe')
|
||||||
}
|
}
|
||||||
app.recompile_v()
|
app.recompile_v()
|
||||||
os.execute_or_panic('"$app.vexe" cmd/tools/vup.v')
|
app.recompile_vup()
|
||||||
app.show_current_v_version()
|
app.show_current_v_version()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,12 +82,26 @@ fn (app App) recompile_v() {
|
|||||||
app.make(vself)
|
app.make(vself)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn (app App) recompile_vup() {
|
||||||
|
vup_result := os.execute('"$app.vexe" -g cmd/tools/vup.v')
|
||||||
|
if vup_result.exit_code != 0 {
|
||||||
|
eprintln('recompiling vup.v failed:')
|
||||||
|
eprintln(vup_result.output)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn (app App) make(vself string) {
|
fn (app App) make(vself string) {
|
||||||
mut make := 'make'
|
mut make := 'make'
|
||||||
$if windows {
|
$if windows {
|
||||||
make = 'make.bat'
|
make = 'make.bat'
|
||||||
}
|
}
|
||||||
make_result := os.execute_or_panic(make)
|
make_result := os.execute(make)
|
||||||
|
if make_result.exit_code != 0 {
|
||||||
|
eprintln('> $make failed:')
|
||||||
|
eprintln('> make output:')
|
||||||
|
eprintln(make_result.output)
|
||||||
|
return
|
||||||
|
}
|
||||||
app.vprintln(make_result.output)
|
app.vprintln(make_result.output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user