This is an automated email from the ASF dual-hosted git repository. pdallig pushed a commit to branch branch-0.9 in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.9 by this push: new b8d2c08 ZEPPELIN-5342: Fixes infinite loop in zeppelin.sh b8d2c08 is described below commit b8d2c080f9b6e58887f3d676f9f333609efdbd27 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 (cherry picked from commit 6ebf0edd95f68fa48be3832d3630f07bebdd39bc) Signed-off-by: Philipp Dallig <philipp.dal...@gmail.com> --- bin/zeppelin.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/zeppelin.sh b/bin/zeppelin.sh index d8cf00b..a09e576 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