MON-494 trap error to clean terraform tmp config file

This commit is contained in:
Quentin Manfroi 2019-08-12 21:45:49 +02:00
parent f91ad224ec
commit 57d7874dda

View File

@ -4,6 +4,12 @@ source "$(dirname $0)/utils.sh"
init
echo "Check terraform CI"
# Clean when exit
err() {
rm -f "${module}/tmp.tf"
}
trap 'err $LINENO' ERR TERM EXIT INT
provider_version=$(grep ^[[:space:]]*version[[:space:]]= README.md | awk '{print $3}')
for path in $(browse_modules "$(get_scope ${1:-})" 'inputs.tf'); do