summary refs log tree commit diff stats
path: root/tools/finish.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tools/finish.nim')
-rw-r--r--tools/finish.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/finish.nim b/tools/finish.nim
index 815b99a12..f7238928a 100644
--- a/tools/finish.nim
+++ b/tools/finish.nim
@@ -203,7 +203,8 @@ when defined(windows):
 proc main() =
   when defined(windows):
     let nimDesiredPath = expandFilename(getCurrentDir() / "bin")
-    let nimbleDesiredPath = expandFilename(getEnv("USERPROFILE") / ".nimble" / "bin")
+    let nimbleBin = getEnv("USERPROFILE") / ".nimble" / "bin"
+    let nimbleDesiredPath = try: expandFilename(nimbleBin) except: nimbleBin
     let p = tryGetUnicodeValue(r"Environment", "Path",
       HKEY_CURRENT_USER) & ";" & tryGetUnicodeValue(
         r"System\CurrentControlSet\Control\Session Manager\Environment", "Path",