From 64160c2df2cde7e816c24ea66a866bdd1d39560a Mon Sep 17 00:00:00 2001 From: Florian Lauch <33784129+EdenComp@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:46:42 +0200 Subject: [PATCH] fix: infisical dump script (#42) --- scripts/dump_env.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dump_env.sh b/scripts/dump_env.sh index 5d01433c..3a93ad59 100755 --- a/scripts/dump_env.sh +++ b/scripts/dump_env.sh @@ -7,6 +7,7 @@ if [ -z "$1" ] exit 1 fi INFISICAL_ENVIRONMENT=$1 +GIT_ROOT_PATH=$(git rev-parse --show-toplevel) # Define paths to dump paths=( \ @@ -24,7 +25,7 @@ clear='\033[0m' INDEX=1 for path in "${paths[@]}" do - infisical export --env="$INFISICAL_ENVIRONMENT" --path="$path" > "$path"$file + infisical export --env="$INFISICAL_ENVIRONMENT" --path="$path" > "$GIT_ROOT_PATH/$path"$file echo -e "${green}Dumped ${path}${file} ($INDEX/${#paths[@]}) ${clear}" ((INDEX++)) done