Skip to content

Commit

Permalink
Disable tty pass through to talisman binary in pre-push hook mode
Browse files Browse the repository at this point in the history
  • Loading branch information
svishwanath-tw committed Sep 7, 2020
1 parent 648e456 commit df8a1cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion global_install_scripts/talisman_hook_script.bash
Expand Up @@ -75,7 +75,10 @@ fi
DEBUG_OPTS=""
[[ -n "${TALISMAN_DEBUG}" ]] && DEBUG_OPTS="-d"
INTERACTIVE=""
[[ -n "${TALISMAN_INTERACTIVE}" ]] && INTERACTIVE="-i"
if [ -n "${TALISMAN_INTERACTIVE}" ]; then
INTERACTIVE="-i"
[[ "${HOOKNAME}" == "pre-commit" ]] && exec < /dev/tty || echo_warning "talisman pre-push hook cannot be invoked in interactive mode currently"
fi

CMD="${TALISMAN_BINARY} ${DEBUG_OPTS} --githook ${HOOKNAME} ${INTERACTIVE}"
echo_debug "ARGS are $@"
Expand Down

0 comments on commit df8a1cc

Please sign in to comment.