From e9990712bce0c9b4ceec2812fd99e594e581120d Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 14 Mar 2023 18:45:58 +0200 Subject: [PATCH] Allow running nimble test in dependencies in the vendor forlder --- config.nims | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config.nims b/config.nims index 463453547..8dea23dec 100644 --- a/config.nims +++ b/config.nims @@ -1,8 +1,13 @@ import strutils -when getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and - system.fileExists("nimbus-build-system.paths"): - --noNimblePath +const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)] + +if getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and + # BEWARE + # In Nim 1.6, config files are evaluated with a working directory + # matching where the Nim command was invocated. This means that we + # must do all file existance checks with full absolute paths: + system.fileExists(currentDir & "nimbus-build-system.paths"): include "nimbus-build-system.paths" if defined(release):