From 3a068149a74d693db4157a18a9cb9dca1e05ed5e Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Mon, 2 Mar 2026 11:52:38 +0100 Subject: [PATCH] fix: update init.sh to use correct path for accounts.env file --- test/init.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/init.sh b/test/init.sh index ff4a4d5..4ac81e8 100755 --- a/test/init.sh +++ b/test/init.sh @@ -1,15 +1,26 @@ #!/usr/bin/env bash +AZURITE_DIR="$HOME/.azurite" +if [[ ! -d "$AZURITE_DIR" ]]; then + echo "Error: Azurite data directory not found at $AZURITE_DIR" >&2 + exit 1 +fi + +if [[ ! -f "$AZURITE_DIR/accounts.env" ]]; then + echo "Error: accounts.env file not found at $AZURITE_DIR/accounts.env" >&2 + exit 1 +fi + ACCESS_KEY="" while [[ $# -gt 0 ]]; do case "$1" in --key|-k) - if [[ ! -f "../accounts.env" ]]; then - echo "Error: accounts.env file not found at ../accounts.env" >&2 + if [[ ! -f "$AZURITE_DIR/accounts.env" ]]; then + echo "Error: accounts.env file not found at $AZURITE_DIR/accounts.env" >&2 exit 1 fi # Load the accounts.env file to get the ACCESS_KEY variable. - source "../accounts.env" + source "$AZURITE_DIR/accounts.env" ACCESS_KEY=$(echo "$AZURITE_ACCOUNTS" | cut -f 1 -d ';' | cut -f 2 -d ':') ;; *)