Skip to content

Commit 991d15e

Browse files
committed
fix(tamplate.sh): fix git directory issue
In directory without git, gct command dos'nt work. BREAKING CHANGE: gct command doesn't work anymore in normal directory.
1 parent 8085227 commit 991d15e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

template.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
22

3+
# Check in this directory git exist
4+
if [ ! -d .git ]; then
5+
exit 1
6+
fi
7+
38
# Color formatting
49
RED="\033[0;31m"
510
GREEN="\033[0;32m"
@@ -104,4 +109,3 @@ ${CLOSED_ISSUES}"
104109
else
105110
printf "\n${RED}❌ An error occurred. Please try again.${RESET}\n"
106111
fi
107-

zsh_gct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
alias gct='./template.sh'
1+
alias gct='/home/jakode/git-commit-template/template.sh'
22

0 commit comments

Comments
 (0)