From 467c8d075f3504251ff1c64e03c40b92ffba0c1d Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Tue, 2 Jul 2024 11:58:42 +0200 Subject: [PATCH] chore(direnv): Set `BBL_STATE_DIRECTORY` if possible # Issue To execute `bbl` commands you would need to change into the bbl state directory or set it via the `--state-dir` flag. # Fix Export `BBL_STATE_DIRECTORY` in the `.envrc` if it has been found at the expected place. --- .envrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index bdc753ffe8..0149484177 100644 --- a/.envrc +++ b/.envrc @@ -19,7 +19,9 @@ fi local bbl_state_dir=../app-autoscaler-env-bbl-state/bbl-state if has bbl && [[ -d "$bbl_state_dir" ]] then - eval "$(bbl print-env --state-dir "$bbl_state_dir")" + BBL_STATE_DIRECTORY="$(realpath "$bbl_state_dir")" + export BBL_STATE_DIRECTORY + eval "$(bbl print-env)" fi export DBURL="postgres://postgres:postgres@localhost/autoscaler"