diff --git a/src/nimble.nim b/src/nimble.nim index 2506c198c..1d08b468b 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -2326,7 +2326,7 @@ proc getAlteredPath(options: Options): string = paths.add folder paths.reverse let parentDir = options.nimBin.get.path.parentDir - result = fmt "{paths.join(separator)}{separator}{parentDir}{separator}{getEnv(\"PATH\")}" + result = fmt "{getAppDir()}{separator}{paths.join(separator)}{separator}{parentDir}{separator}{getEnv(\"PATH\")}" proc shellenv(options: var Options) = setVerbosity(SilentPriority) diff --git a/tests/tshellenv.nim b/tests/tshellenv.nim index e9cc20092..00d7575b7 100644 --- a/tests/tshellenv.nim +++ b/tests/tshellenv.nim @@ -32,5 +32,5 @@ suite "Shell env": check prefix == "export PATH" - check dirs[0].extractFileName == "shellenv" - check dirs[1].extractFileName == "testutils-0.5.0-756d0757c4dd06a068f9d38c7f238576ba5ee897" \ No newline at end of file + check dirs[1].extractFileName == "shellenv" + check dirs[2].extractFileName == "testutils-0.5.0-756d0757c4dd06a068f9d38c7f238576ba5ee897" \ No newline at end of file