1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v up: on windows delete existing v_old.exe before renaming the new v.exe to it

This commit is contained in:
Delyan Angelov 2019-09-15 04:33:08 +03:00 committed by Alexander Medvednikov
parent 2eeb4c6153
commit 1d7b9a3b0b

View File

@ -893,7 +893,11 @@ fn update_v() {
}
println(s.output)
$if windows {
os.mv('$vroot/v.exe', '$vroot/v_old.exe')
v_backup_file := '$vroot/v_old.exe'
if os.file_exists( v_backup_file ) {
os.rm( v_backup_file )
}
os.mv('$vroot/v.exe', v_backup_file)
s2 := os.exec('$vroot/make.bat') or {
cerror(err)
return