Skip to content

Commit 0ab55f8

Browse files
authored
Merge pull request #221 from dannysauer/bug/no-require-terminal
Only emit terminal codes to terminal (and don't require `say`)
2 parents b1fdfe0 + b9e40d8 commit 0ab55f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-secrets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ install_hook() {
205205
echo "#!/usr/bin/env bash" > "${dest}"
206206
echo "git secrets --${cmd} -- \"\$@\"" >> "${dest}"
207207
chmod +x "${dest}"
208-
say "$(tput setaf 2)$(tput sgr 0) Installed ${hook} hook to ${dest}"
208+
[ -t 1 ] && command -v tput &> /dev/null && echo -n "$(tput setaf 2)$(tput sgr 0) "
209+
echo "Installed ${hook} hook to ${dest}"
209210
}
210211

211212
install_all_hooks() {

0 commit comments

Comments
 (0)