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

Fix print content for -v -h & version for version -h as well #369

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
27 changes: 20 additions & 7 deletions resources/bin/bal
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@
export BALLERINA_HOME

if test -f "$BALLERINA_HOME/bin/./bal"; then
$BALLERINA_HOME/bin/./bal "$@"
if { [ "$1" == "-v" ] || [ "$1" == "--version" ] || [ "$1" == "version" ]; } && { [ "$2" == "-h" ] || [ "$2" == "--help" ] || [ "$2" == "help" ]; }
then
$BALLERINA_HOME/bin/./bal version --help
else
$BALLERINA_HOME/bin/./bal "$@"
fi

else
if test -f "$BALLERINA_HOME/bin/./ballerina"; then
$BALLERINA_HOME/bin/./ballerina "$@"
Expand All @@ -136,12 +142,19 @@
EXIT_CODE=$?
fi

if [ "$1" == "help" ] && [ "$2" == "" ] || [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] || \
[ "$1" == "version" ] || [ "$1" == "-v" ] || [ "$1" == "--version" ]
if { [ "$1" == "-v" ] || [ "$1" == "--version" ] || [ "$1" == "version" ]; } && { [ "$2" == "-h" ] || [ "$2" == "--help" ] || [ "$2" == "help" ]; }
then
$JAVA_COMMAND -jar $CURRENT_PATH/../lib/ballerina-command-@[email protected] "$@"
exit $?
else
exit $EXIT_CODE
$BALLERINA_HOME/bin/./bal version
$JAVA_COMMAND -jar $CURRENT_PATH/../lib/ballerina-command-1.4.5-SNAPSHOT.jar "-v"
exit $?
else
if [ "$1" == "help" ] && [ "$2" == "" ] || [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] || \
[ "$1" == "version" ] || [ "$1" == "-v" ] || [ "$1" == "--version" ]
then
$JAVA_COMMAND -jar $CURRENT_PATH/../lib/ballerina-command-1.4.5-SNAPSHOT.jar "$@"
exit $?
else
exit $EXIT_CODE
fi
fi
}; exit
Loading