Skip to content

Commit

Permalink
imp: add support for symlink repos on toplevel check
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed Jun 27, 2022
1 parent b905a01 commit b6725c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/terraform/tf-options.nix
Expand Up @@ -347,8 +347,8 @@
echo " STATE_ARG = ''${STATE_ARG:-remote}"
echo
echo "Important path variables:"
echo " TOP (gitTopLevelDir) = $TOP"
echo " PWD (currentWorkingDir) = $PWD"
echo " TOP (physical gitTopLevelDir) = $TOP"
echo " PWD (physical currentWorkingDir) = $PWD"
echo " REL_ENCRYPTED_FOLDER = $REL_ENCRYPTED_FOLDER"
echo
echo "Important git variables:"
Expand Down Expand Up @@ -629,15 +629,15 @@
}
TOP="$(git rev-parse --show-toplevel)"
PWD="$(pwd)"
PWD="$(pwd -P)"
# Ensure this TF operation is being run from the top level of the git repo
STATUS="$([ "$PWD" = "$TOP" ] && echo "pass" || echo "FAIL")"
MSG=(
"The TF attrs need to be run from the top level directory of the repo:\n"
" * Top level repo directory is:\n"
" * Top level physical repo directory is:\n"
" $TOP\n\n"
" * Current working directory is:\n"
" * Current physical working directory is:\n"
" $PWD"
)
gate "$STATUS" "$(printf '%s' "''${MSG[@]}")"
Expand Down

0 comments on commit b6725c7

Please sign in to comment.