From bf49330d2c4dff42c447f72a2be68daf78ff9a2f Mon Sep 17 00:00:00 2001 From: shinriyo Date: Tue, 20 Mar 2018 11:39:56 +0900 Subject: [PATCH 1/3] for a sense of unity. another is .nimble. so I modified. --- src/nimble.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nimble.nim b/src/nimble.nim index f51f7fd..dab343c 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -724,7 +724,7 @@ proc init(options: Options) = validatePackageName(nimbleFile.changeFileExt("")) if existsFile(os.getCurrentDir() / nimbleFile): - raise newException(NimbleError, "Nimble file already exists.") + raise newException(NimbleError, ".nimble file already exists.") display("Using", "$# for new package name" % [pkgName.escape()], priority = HighPriority) From 21357d3fa5a104332881bbaa90854df06a4226e2 Mon Sep 17 00:00:00 2001 From: shinriyo Date: Wed, 21 Mar 2018 12:09:24 +0900 Subject: [PATCH 2/3] apply review feedback I fix. --- src/nimble.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nimble.nim b/src/nimble.nim index dab343c..43ff68c 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -724,7 +724,9 @@ proc init(options: Options) = validatePackageName(nimbleFile.changeFileExt("")) if existsFile(os.getCurrentDir() / nimbleFile): - raise newException(NimbleError, ".nimble file already exists.") + let path = os.getCurrentDir() / nimbleFile + let errMsg = "Nimble file already exists: $#" % path + raise newException(NimbleError, errMsg); display("Using", "$# for new package name" % [pkgName.escape()], priority = HighPriority) From 35c12cd97296af74eab3fd0eaf49c82bffc789b7 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 21 Mar 2018 11:10:23 +0000 Subject: [PATCH 3/3] 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)