File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,19 @@ cmd_update() {
877877 local remote
878878 local tag_branch
879879 local upstream_repo_owner=liferay
880- local unstable_flag=" ${1} "
880+
881+ local FLAG_UNSTABLE=0
882+
883+ while [[ $# -gt 0 ]]; do
884+ case " ${1} " in
885+ --unstable)
886+ shift && FLAG_UNSTABLE=1
887+ ;;
888+ * )
889+ shift
890+ ;;
891+ esac
892+ done
881893
882894 remote=" $( _git remote -v | grep " \b${upstream_repo_owner} /liferay-environment-composer\b" | grep -F ' (fetch)' | awk ' {print $1}' | head -n1) "
883895 if [[ -z " ${remote} " ]]; then
@@ -904,7 +916,7 @@ cmd_update() {
904916
905917 _print_step " Checking for updates..."
906918
907- if [[ " ${unstable_flag } " == " --unstable " ]]; then
919+ if [[ " ${FLAG_UNSTABLE } " -gt 0 ]]; then
908920 _git fetch " ${remote} " master
909921
910922 if ! _git rebase " ${remote} /master" master; then
You can’t perform that action at this time.
0 commit comments