MON-311 replace pwd function by env variable for pwd

This commit is contained in:
Quentin Manfroi 2018-09-26 11:24:51 +02:00
parent 62ce38ca98
commit 8c41f1f5b8

View File

@ -4,7 +4,7 @@ set -xueo pipefail
source "$(dirname $0)/utils.sh"
goto_root
root=$(basename $(pwd))
root=$(basename ${PWD})
# loop over every monitors set
for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors-*.tf' -print | sort -fdbi); do
@ -14,7 +14,7 @@ for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors
# if modules.tf does not exist AND if this set respect our tagging convention
if ! [ -f modules.tf ] && grep -q filter_tags_use_defaults inputs.tf; then
relative=""
current="$(pwd)"
current="${PWD}"
while [[ "$(basename $current)" != "$root" ]]; do
relative="${relative}../"
current="$(dirname $current)"