From 35c12cd97296af74eab3fd0eaf49c82bffc789b7 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 21 Mar 2018 11:10:23 +0000 Subject: [PATCH] Fixes to PR. --- src/nimble.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nimble.nim b/src/nimble.nim index 43ff68c..b936ad9 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -723,10 +723,10 @@ proc init(options: Options) = nimbleFile = pkgName.changeFileExt("nimble") validatePackageName(nimbleFile.changeFileExt("")) - if existsFile(os.getCurrentDir() / nimbleFile): - let path = os.getCurrentDir() / nimbleFile - let errMsg = "Nimble file already exists: $#" % path - raise newException(NimbleError, errMsg); + let nimbleFilePath = os.getCurrentDir() / nimbleFile + if existsFile(nimbleFilePath): + let errMsg = "Nimble file already exists: $#" % nimbleFilePath + raise newException(NimbleError, errMsg) display("Using", "$# for new package name" % [pkgName.escape()], priority = HighPriority)