Allow running nimble test in dependencies in the vendor forlder

This commit is contained in:
Zahary Karadjov 2023-03-14 18:45:58 +02:00
parent 8989141446
commit e9990712bc
No known key found for this signature in database
GPG Key ID: C1F42EAFF38D570F
1 changed files with 8 additions and 3 deletions

View File

@ -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):