Skip to content

Commit

Permalink
Handle cases when environment variable is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
svishwanath-tw committed Sep 9, 2020
1 parent d407996 commit 9355e5c
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 9355e5c

Please sign in to comment.