Skip to content

Commit

Permalink
MINOR: Cause 'ksql help' and 'ksql -help' to behave the same as 'ksql…
Browse files Browse the repository at this point in the history
… -h' and 'ksql --help' (#2023)
  • Loading branch information
vcrfxia authored Oct 12, 2018
1 parent c77af4b commit d27efe0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions bin/ksql-run-class
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,10 @@ if [ -z "$KSQL_JVM_PERFORMANCE_OPTS" ]; then
KSQL_JVM_PERFORMANCE_OPTS="-server -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+ExplicitGCInvokesConcurrent -XX:NewRatio=1 -Djava.awt.headless=true"
fi

usage() {
echo "USAGE: $0 [-daemon] [opts] [-help]"
exit 1
}

if [ $# -lt 1 ];
then
usage
echo "USAGE: $0 [-daemon] [opts] [-help]"
exit 1
fi

MAIN="$1"
Expand All @@ -106,6 +102,9 @@ DAEMON_NAME=""
GC_LOG_ENABLED=""
DAEMON_MODE=""
HELP=""
if [ "$1" = "help" ]; then
HELP="true"
fi
while [ $# -gt 0 ]; do
COMMAND="$1"
case "$COMMAND" in
Expand Down Expand Up @@ -156,7 +155,8 @@ fi


if [ "x$HELP" = "xtrue" ]; then
usage
exec "$JAVA" -cp "$KSQL_CLASSPATH" "$MAIN" --help
exit 1
fi

OPTIONS=($KSQL_HEAP_OPTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Builder parseArgs(final String[] args) throws IOException {
// CHECKSTYLE_RULES.OFF: CyclomaticComplexity
private Builder parseArg(final String arg) throws IOException {
// CHECKSTYLE_RULES.ON: CyclomaticComplexity
if ("help".equals(arg)) {
if ("help".equals(arg) || "--help".equals(arg)) {
help = true;
return this;
}
Expand Down

0 comments on commit d27efe0

Please sign in to comment.