Skip to content

Commit

Permalink
Merge pull request awslabs#221 from dannysauer/bug/no-require-terminal
Browse files Browse the repository at this point in the history
Only emit terminal codes to terminal (and don't require `say`)
  • Loading branch information
creswick authored Jun 20, 2023
2 parents b1fdfe0 + b9e40d8 commit 0ab55f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ install_hook() {
echo "#!/usr/bin/env bash" > "${dest}"
echo "git secrets --${cmd} -- \"\$@\"" >> "${dest}"
chmod +x "${dest}"
say "$(tput setaf 2)$(tput sgr 0) Installed ${hook} hook to ${dest}"
[ -t 1 ] && command -v tput &> /dev/null && echo -n "$(tput setaf 2)$(tput sgr 0) "
echo "Installed ${hook} hook to ${dest}"
}

install_all_hooks() {
Expand Down

0 comments on commit 0ab55f8

Please sign in to comment.