diff options
author | Jason Beetham <beefers331@gmail.com> | 2021-03-27 18:43:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 01:43:24 +0100 |
commit | d96469037ecc1ee7982b420cbe6ce34e91d18b01 (patch) | |
tree | 1a2d71c1fcb62886704b427d2b557187e2db5184 | |
parent | bbe4cf4703903081553fe066ece5a57a5f190493 (diff) | |
download | Nim-d96469037ecc1ee7982b420cbe6ce34e91d18b01.tar.gz |
Fixed embedded nimscript imports (#17425)
-rw-r--r-- | compiler/options.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 2d63043df..2c8d43733 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -812,10 +812,11 @@ proc findModule*(conf: ConfigRef; modulename, currentModule: string): AbsoluteFi for candidate in stdlibDirs: let path = (conf.libpath.string / candidate / stripped) if fileExists(path): - m = path + result = AbsoluteFile path break - let currentPath = currentModule.splitFile.dir - result = AbsoluteFile currentPath / m + else: # If prefixed with std/ why would we add the current module path! + let currentPath = currentModule.splitFile.dir + result = AbsoluteFile currentPath / m if not fileExists(result): result = findFile(conf, m) patchModule(conf) |