File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ case "${arg}" in
8484 tfenv---version;
8585 tfenv-help;
8686 } | abort && exit 1;
87- exit 1;
8887 ;;
8988 -v | --version )
9089 log ' debug' ' tfenv version requested...' ;
Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ function tfenv-exec() {
5050 export TFENV_VERSION;
5151
5252 if [ ! -d " ${TFENV_CONFIG_DIR} /versions/${TFENV_VERSION} " ]; then
53- if [ " ${TFENV_AUTO_INSTALL:- true} " == " true" ]; then
54- if [ -z " ${TFENV_TERRAFORM_VERSION:- " " } " ]; then
55- TFENV_VERSION_SOURCE=" $( tfenv-version-file) " ;
56- else
57- TFENV_VERSION_SOURCE=' TFENV_TERRAFORM_VERSION' ;
58- fi ;
53+ if [ " ${TFENV_AUTO_INSTALL:- true} " == " true" ]; then
54+ if [ -z " ${TFENV_TERRAFORM_VERSION:- " " } " ]; then
55+ TFENV_VERSION_SOURCE=" $( tfenv-version-file) " ;
56+ else
57+ TFENV_VERSION_SOURCE=' TFENV_TERRAFORM_VERSION' ;
58+ fi ;
5959 log ' info' " version '${TFENV_VERSION} ' is not installed (set by ${TFENV_VERSION_SOURCE} ). Installing now as TFENV_AUTO_INSTALL==true" ;
6060 tfenv-install;
6161 else
Original file line number Diff line number Diff line change @@ -282,13 +282,15 @@ if [[ -n "${shasum_bin}" && -x "${shasum_bin}" ]]; then
282282 -a 256 \
283283 -s \
284284 -c <( grep -F " ${tarball_name} " " ${shasums_name} " )
285- ) || log ' error' ' SHA256 hash does not match!' ;
285+ ) && log ' info' ' SHA256 hash matched!' \
286+ || log ' error' ' SHA256 hash does not match!' ;
286287elif [[ -n " ${sha256sum_bin} " && -x " ${sha256sum_bin} " ]]; then
287288 (
288289 cd " ${download_tmp} " ;
289290 " ${sha256sum_bin} " \
290291 -c <( grep -F " ${tarball_name} " " ${shasums_name} " )
291- ) || log ' error' ' SHA256 hash does not match!' ;
292+ ) && log ' info' ' SHA256 hash matched!' \
293+ || log ' error' ' SHA256 hash does not match!' ;
292294else
293295 # Lack of shasum deserves a proper warning
294296 log ' warn' ' No shasum tool available. Skipping SHA256 hash validation' ;
You can’t perform that action at this time.
0 commit comments