Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert unexplained changes from #766 #780

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ function _check_setup {
fi
}

function _incorrect_usage {
echo "git-secret: abort: $1"
usage
exit "$2"
}

function _show_version {
echo "$GITSECRET_VERSION"
Expand All @@ -34,9 +39,7 @@ function _show_version {

function _init_script {
if [[ $# == 0 ]]; then
echo "git-secret: abort: 'no input parameters provided.'"
usage "$@"
exit 126
_incorrect_usage 'no input parameters provided.' 126
fi

# Parse plugin-level options:
Expand Down Expand Up @@ -68,9 +71,7 @@ function _init_script {
if [[ "$function_exists" == 0 ]] && [[ ! $1 == _* ]]; then
$1 "${@:2}"
else # TODO: elif [[ $(_plugin_exists $1) == 0 ]]; then
echo "git-secret: abort: command '$1' not found."
usage "$@"
exit 126
_incorrect_usage "command $1 not found." 126
fi
fi
}
Expand Down