Skip to content

Commit

Permalink
Fix interactive() giving wrong file name
Browse files Browse the repository at this point in the history
It was cutting the file content instead of the file name
  • Loading branch information
duchainer committed Aug 24, 2021
1 parent 827a884 commit 282b6b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion githooker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function interactive {
echo -e "\n${b}[INFO]${u} each ${b}hook$u will be listed with its ${b}status$u. Say yes or no to change hook state. (y/${b}N$u)"

for hook in "$BASE/$hook_dir/"*; do
hook_without_extension="$(cut -d '.' -f1 "$hook")"
hook_without_extension="$(basename $hook | cut -d "." -f1)"

if [ -f "$BASE/$GIT_HOOK_DIR/$hook_without_extension" ]; then
echo -e "\n\t${g}${b}$hook_without_extension${u} hook is enabled${d}. Do you want to ${b}disable${u} it? (y/N)"
Expand Down

0 comments on commit 282b6b0

Please sign in to comment.