Skip to content

Commit

Permalink
Merge pull request #538 from nim-lang/handle-remove-dir-error
Browse files Browse the repository at this point in the history
Handle remove dir error
  • Loading branch information
Araq authored Sep 12, 2018
2 parents 0909179 + 3ba8bd9 commit ee4c0ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions nimble.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ license = "BSD"

bin = @["nimble"]
srcDir = "src"
installExt = @["nim"]

# Dependencies

Expand Down
6 changes: 5 additions & 1 deletion src/nimble.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ee4c0ae

Please sign in to comment.