mirror of
https://github.com/git-quick-stats/git-quick-stats.git
synced 2025-12-16 12:00:12 +01:00
Fix: show help page when not inside a git repository
Ensure the usage function is called to display the help page if the script is not run inside a git repository. #168
This commit is contained in:
@@ -986,7 +986,11 @@ function suggestReviewers() {
|
||||
checkUtils
|
||||
|
||||
# Check if we are currently in a git repo.
|
||||
git rev-parse --is-inside-work-tree > /dev/null
|
||||
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
||||
echo "Not inside a git repository."
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Parse non-interative commands
|
||||
if [[ "$#" -eq 1 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user