From f4c6ef145d27d569873d97ead646a91699ebf88b Mon Sep 17 00:00:00 2001 From: Nicu Reut Date: Tue, 5 May 2026 18:55:12 +0000 Subject: [PATCH] Allow overriding vars in the private envrc.vars Fixes issues where not sourcing the private vars before loading nix loads the oss edition [ci] Signed-off-by: Nicu Reut --- .envrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.envrc b/.envrc index b48409afbc..475d919326 100644 --- a/.envrc +++ b/.envrc @@ -14,8 +14,14 @@ use_flake_subdir() { fi } -# Private .envrc -[[ -f .envrc.private ]] && [[ -z "$IGNORE_PRIVATE_ENVRC" ]] && source_env .envrc.private || true +source_envrc_private() { + [[ -f .envrc.private ]] && [[ -z "$IGNORE_PRIVATE_ENVRC" ]] && source_env .envrc.private || true +} + +# Source .envrc.private before use_flake_subdir because it provides ARTIFACTORY_PASSWORD +# which determines whether the enterprise or OSS nix shell is used. +# This workaround can be removed once the enterprise edition is removed. +source_envrc_private # TODO(DACH-NY/canton-network-node#3876) work around for $TMPDIR is removed. #3876 to investigate more OLD_TMPDIR=$TMPDIR @@ -27,6 +33,10 @@ export TMPDIR=$OLD_TMPDIR source_env .envrc.vars +# Re-source .envrc.private so it can override any vars from .envrc.vars +source_envrc_private + + source "${TOOLS_LIB}/libcli.source" source_env .envrc.validate