vrepl: fix cleanup on windows

pull/4693/head
yuyi 2020-05-04 00:13:37 +08:00 committed by GitHub
parent 4a096bd133
commit b4e4e6bb21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -81,8 +81,19 @@ pub fn run_repl(workdir string, vrepl_prefix string) []string {
println('') println('')
os.rm(file) os.rm(file)
os.rm(temp_file) os.rm(temp_file)
os.rm(file[..file.len - 2]) $if windows {
os.rm(temp_file[..temp_file.len - 2]) os.rm(file[..file.len - 2] + '.exe')
os.rm(temp_file[..temp_file.len - 2] + '.exe')
$if msvc {
os.rm(file[..file.len - 2] + '.ilk')
os.rm(file[..file.len - 2] + '.pdb')
os.rm(temp_file[..temp_file.len - 2] + '.ilk')
os.rm(temp_file[..temp_file.len - 2] + '.pdb')
}
} $else {
os.rm(file[..file.len - 2])
os.rm(temp_file[..temp_file.len - 2])
}
} }
mut r := Repl{} mut r := Repl{}
mut readline := readline.Readline{} mut readline := readline.Readline{}