mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01)
This commit is contained in:
@@ -30,7 +30,7 @@ fn main() {
|
||||
// The user just wants an independent copy of v, and so we are done.
|
||||
return
|
||||
}
|
||||
backup_old_version_and_rename_newer(short_v_name) or { panic(err.msg) }
|
||||
backup_old_version_and_rename_newer(short_v_name) or { panic(err.msg()) }
|
||||
println('V built successfully as executable "$vexe_name".')
|
||||
}
|
||||
|
||||
@@ -71,17 +71,17 @@ fn backup_old_version_and_rename_newer(short_v_name string) ?bool {
|
||||
|
||||
list_folder(short_v_name, 'before:', 'removing $bak_file ...')
|
||||
if os.exists(bak_file) {
|
||||
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg' }
|
||||
os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg()' }
|
||||
}
|
||||
|
||||
list_folder(short_v_name, '', 'moving $v_file to $bak_file ...')
|
||||
os.mv(v_file, bak_file) or { errors << err.msg }
|
||||
os.mv(v_file, bak_file) or { errors << err.msg() }
|
||||
|
||||
list_folder(short_v_name, '', 'removing $v_file ...')
|
||||
os.rm(v_file) or {}
|
||||
|
||||
list_folder(short_v_name, '', 'moving $v2_file to $v_file ...')
|
||||
os.mv_by_cp(v2_file, v_file) or { panic(err.msg) }
|
||||
os.mv_by_cp(v2_file, v_file) or { panic(err.msg()) }
|
||||
|
||||
list_folder(short_v_name, 'after:', '')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user