This is an automated email from the ASF dual-hosted git repository. pdallig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new 6ebf0ed ZEPPELIN-5342: Fixes infinite loop in zeppelin.sh 6ebf0ed is described below commit 6ebf0edd95f68fa48be3832d3630f07bebdd39bc Author: Pasha Finkelshteyn <pavel.finkelsht...@gmail.com> AuthorDate: Tue Apr 27 17:02:00 2021 +0300 ZEPPELIN-5342: Fixes infinite loop in zeppelin.sh ### What is this PR for? If a user is passing an invalid argument to zeppelin.sh it freezes in an infinite loop. This small change changes this behavior and outputs usage information instead of looping forever in the `while` cycle. ### What type of PR is it? Bug Fix ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-5342 ### How should this be tested? Just call `zeppelin.sh` with any type of unsupported arguments Author: Pasha Finkelshteyn <pavel.finkelsht...@gmail.com> Closes #4102 from asm0dey/patch-1 and squashes the following commits: bd31fddf9 [Pasha Finkelshteyn] Fixes infinite loop in zeppelin.sh --- bin/zeppelin.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/zeppelin.sh b/bin/zeppelin.sh index 10f50c2..ef85eaa 100755 --- a/bin/zeppelin.sh +++ b/bin/zeppelin.sh @@ -44,7 +44,6 @@ fi function usage() { echo "Usage: bin/zeppelin.sh [--config <conf-dir>] [--run <noteId>]" - exit 0 } POSITIONAL=() @@ -62,11 +61,14 @@ do shift # past argument shift # past value ;; - --help) + -h|--help) usage + exit 0 ;; - -h) + *) + echo "Unsupported argument." usage + exit 1 ;; esac done