Skip to content

Commit 17ef01b

Browse files
committed
windows fix
Signed-off-by: George Lemon <georgelemon@protonmail.com>
1 parent 2b191f8 commit 17ef01b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/kapsis/framework.nim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ proc findNimbleFile(): string {.compileTime.} =
7676
## and returns its path, or an empty string if none was found
7777
let proj = getProjectPath()
7878
for dir in @[proj, proj / "..", proj / ".." / ".."]:
79+
let pattern = dir / "*.nimble"
7980
when defined(windows):
80-
let matches = staticExec("dir /b /a-d \"" & dir & "\\*.nimble\" 2>nul").strip()
81+
let matches = staticExec(
82+
"dir /" & "b /a" & "-d \"" & pattern & "\" 2>n" & "ul").strip()
8183
else:
82-
let matches = staticExec("ls \"" & dir & "\"/*.nimble 2>/dev/null").strip()
84+
let matches = staticExec(
85+
"ls \"" & dir & "\"/*.nimble 2>/dev/" & "null").strip()
8386
if matches.len > 0:
8487
for line in matches.splitLines:
8588
let f = line.strip()

0 commit comments

Comments
 (0)