Skip to content

Commit 8250663

Browse files
authored
Changes the order of path so the nim in the deps is prioritised (#1333)
* Changes the order of `path` so the `nim` in the deps is prioritized * fixes test * removes unused
1 parent d7c1b2f commit 8250663

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/nimble.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,7 @@ proc getAlteredPath(options: Options): string =
22602260
paths.add folder
22612261
paths.reverse
22622262
let parentDir = options.nimBin.get.path.parentDir
2263-
result = fmt "{parentDir}{separator}{paths.join(separator)}{separator}{getEnv(\"PATH\")}"
2263+
result = fmt "{paths.join(separator)}{separator}{parentDir}{separator}{getEnv(\"PATH\")}"
22642264

22652265
proc shellenv(options: var Options) =
22662266
setVerbosity(SilentPriority)

tests/tshellenv.nim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ suite "Shell env":
2828

2929
when defined windows:
3030
check prefix == "set PATH"
31-
const extension = ".exe"
3231
else:
33-
const extension = ""
3432
check prefix == "export PATH"
3533

36-
check (dirs[0] / ("nim" & extension)).fileExists
37-
check dirs[1].extractFileName == "shellenv"
38-
check dirs[2].extractFileName == "testutils-0.5.0-756d0757c4dd06a068f9d38c7f238576ba5ee897"
34+
35+
check dirs[0].extractFileName == "shellenv"
36+
check dirs[1].extractFileName == "testutils-0.5.0-756d0757c4dd06a068f9d38c7f238576ba5ee897"

0 commit comments

Comments
 (0)