Merge pull request #538 from nim-lang/handle-remove-dir-error

Handle remove dir error
This commit is contained in:
Andreas Rumpf 2018-09-12 14:32:11 +02:00 committed by GitHub
commit ee4c0aef26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -17,6 +17,7 @@ license = "BSD"
bin = @["nimble"]
srcDir = "src"
installExt = @["nim"]
# Dependencies

View file

@ -1110,7 +1110,11 @@ when isMainModule:
except NimbleQuit:
discard
finally:
removeDir(getNimbleTempDir())
try:
removeDir(getNimbleTempDir())
except OSError:
let msg = "Couldn't remove Nimble's temp dir"
display("Warning:", msg, Warning, MediumPriority)
if error.len > 0:
displayTip()