diff --git a/src/nimble.nim b/src/nimble.nim index e175d02c..d185c61c 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -1857,17 +1857,17 @@ proc setupNimbleConfig(options: Options) = configFileVersion = 2 sectionEnd = "# end Nimble config" sectionStart = "# begin Nimble config" - configFileHeader = &"# begin Nimble config (version {configFileVersion})\n" + configFileHeader = &"# begin Nimble config (version {configFileVersion})" configFileContentNoLock = fmt""" {configFileHeader} -when system.fileExists("{nimblePathsFileName}"): +when withDir(thisDir(), system.fileExists("{nimblePathsFileName}")): include "{nimblePathsFileName}" {sectionEnd} """ configFileContentWithLock = fmt""" {configFileHeader} --noNimblePath -when system.fileExists("{nimblePathsFileName}"): +when withDir(thisDir(), system.fileExists("{nimblePathsFileName}")): include "{nimblePathsFileName}" {sectionEnd} """