MON-311 replace pwd function by env variable for pwd
This commit is contained in:
parent
62ce38ca98
commit
8c41f1f5b8
@ -4,7 +4,7 @@ set -xueo pipefail
|
|||||||
source "$(dirname $0)/utils.sh"
|
source "$(dirname $0)/utils.sh"
|
||||||
goto_root
|
goto_root
|
||||||
|
|
||||||
root=$(basename $(pwd))
|
root=$(basename ${PWD})
|
||||||
|
|
||||||
# loop over every monitors set
|
# loop over every monitors set
|
||||||
for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors-*.tf' -print | sort -fdbi); do
|
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 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
|
if ! [ -f modules.tf ] && grep -q filter_tags_use_defaults inputs.tf; then
|
||||||
relative=""
|
relative=""
|
||||||
current="$(pwd)"
|
current="${PWD}"
|
||||||
while [[ "$(basename $current)" != "$root" ]]; do
|
while [[ "$(basename $current)" != "$root" ]]; do
|
||||||
relative="${relative}../"
|
relative="${relative}../"
|
||||||
current="$(dirname $current)"
|
current="$(dirname $current)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user