mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vup: hide some output when not in verbose mode (#7477)
This commit is contained in:
parent
51a328f28d
commit
a47749b204
@ -36,9 +36,7 @@ fn main() {
|
||||
app.backup('cmd/tools/vup.exe')
|
||||
}
|
||||
app.recompile_v()
|
||||
os.exec('"$app.vexe" cmd/tools/vup.v') or {
|
||||
panic(err)
|
||||
}
|
||||
os.exec('"$app.vexe" cmd/tools/vup.v') or { panic(err) }
|
||||
app.show_current_v_version()
|
||||
}
|
||||
|
||||
@ -66,9 +64,12 @@ fn (app App) recompile_v() {
|
||||
println('> recompiling v itself with `$vself` ...')
|
||||
}
|
||||
if self_result := os.exec(vself) {
|
||||
println(self_result.output.trim_space())
|
||||
if self_result.exit_code == 0 {
|
||||
println(self_result.output.trim_space())
|
||||
return
|
||||
} else if app.is_verbose {
|
||||
println('`$vself` failed, running `make`...')
|
||||
println(self_result.output.trim_space())
|
||||
}
|
||||
}
|
||||
app.make(vself)
|
||||
@ -79,12 +80,11 @@ fn (app App) make(vself string) {
|
||||
$if windows {
|
||||
make = 'make.bat'
|
||||
}
|
||||
println('`$vself` failed, running `$make`...')
|
||||
make_result := os.exec(make) or {
|
||||
panic(err)
|
||||
}
|
||||
make_result := os.exec(make) or { panic(err) }
|
||||
if app.is_verbose {
|
||||
println(make_result.output)
|
||||
}
|
||||
}
|
||||
|
||||
fn (app App) show_current_v_version() {
|
||||
if vout := os.exec('"$app.vexe" version') {
|
||||
@ -111,9 +111,7 @@ fn (app App) backup(file string) {
|
||||
}
|
||||
|
||||
fn (app App) git_command(command string) {
|
||||
git_result := os.exec('git $command') or {
|
||||
panic(err)
|
||||
}
|
||||
git_result := os.exec('git $command') or { panic(err) }
|
||||
if git_result.exit_code != 0 {
|
||||
if git_result.output.contains('Permission denied') {
|
||||
eprintln('No access to `$app.vroot`: Permission denied')
|
||||
|
Loading…
Reference in New Issue
Block a user