Skip to content

Commit

Permalink
Handle cases when environment variable is blank (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
svishwanath-tw authored Sep 9, 2020
1 parent d407996 commit aa8c85f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions global_install_scripts/talisman_hook_script.bash
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ if [[ -f .talisman_skip || -f .talisman_skip.${HOOKNAME} ]]; then
exit 0
fi

TALISMAN_DEBUG="$(toLower "${TALISMAN_DEBUG}")"
DEBUG_OPTS=""
[[ $(toLower "${TALISMAN_DEBUG}") == "true" ]] && DEBUG_OPTS="-d"
[[ "${TALISMAN_DEBUG}" == "true" ]] && DEBUG_OPTS="-d"

TALISMAN_INTERACTIVE="$(toLower "${TALISMAN_INTERACTIVE}")"
INTERACTIVE=""
if [ $(toLower "${TALISMAN_INTERACTIVE}") == "true" ]; then
if [ "${TALISMAN_INTERACTIVE}" == "true" ]; then
INTERACTIVE="-i"
[[ "${HOOKNAME}" == "pre-commit" ]] && exec < /dev/tty || echo_warning "talisman pre-push hook cannot be invoked in interactive mode currently"
fi
Expand Down

0 comments on commit aa8c85f

Please sign in to comment.