Skip to content

Commit 6b37ba7

Browse files
committed
Fix create directory behavior
1 parent 47a5c6c commit 6b37ba7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nimble.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ proc init(options: Options) =
963963
raise nimbleError("Please install git or mercurial first")
964964

965965
# Determine the package name.
966+
let hasprojectname = options.action.projName != ""
966967
let pkgName =
967968
if options.action.projName != "":
968969
options.action.projName
@@ -974,7 +975,7 @@ proc init(options: Options) =
974975

975976
# Determine the package root.
976977
let pkgRoot =
977-
if pkgName == os.getCurrentDir().splitPath.tail:
978+
if not hasprojectname:
978979
os.getCurrentDir()
979980
else:
980981
os.getCurrentDir() / pkgName

0 commit comments

Comments
 (0)