mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vself: handle missing v_old (#9637)
This commit is contained in:
parent
e03db643dc
commit
4f6dde4ac2
@ -67,7 +67,9 @@ 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.msg' }
|
||||
if os.exists(bak_file) {
|
||||
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.msg }
|
||||
|
Loading…
Reference in New Issue
Block a user