mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vself, vup: update to use err.msg instead of err
This commit is contained in:
@ -27,7 +27,7 @@ fn main() {
|
||||
// The user just wants an independent copy of v, and so we are done.
|
||||
return
|
||||
}
|
||||
backup_old_version_and_rename_newer() or { panic(err) }
|
||||
backup_old_version_and_rename_newer() or { panic(err.msg) }
|
||||
println('V built successfully!')
|
||||
}
|
||||
|
||||
@ -67,16 +67,16 @@ fn backup_old_version_and_rename_newer() ?bool {
|
||||
bak_file := os.real_path(short_bak_file)
|
||||
|
||||
list_folder('before:', 'removing $bak_file ...')
|
||||
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err' }
|
||||
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg' }
|
||||
|
||||
list_folder('', 'moving $v_file to $bak_file ...')
|
||||
os.mv(v_file, bak_file) or { errors << err }
|
||||
os.mv(v_file, bak_file) or { errors << err.msg }
|
||||
|
||||
list_folder('', 'removing $v_file ...')
|
||||
os.rm(v_file) or { }
|
||||
os.rm(v_file) or {}
|
||||
|
||||
list_folder('', 'moving $v2_file to $v_file ...')
|
||||
os.mv_by_cp(v2_file, v_file) or { panic(err) }
|
||||
os.mv_by_cp(v2_file, v_file) or { panic(err.msg) }
|
||||
|
||||
list_folder('after:', '')
|
||||
|
||||
|
Reference in New Issue
Block a user