CLI : Add check if there is argument 94/12394/1
authorhyeongseok.heo <hyeongseok.heo@samsung.com>
Thu, 14 Nov 2013 11:19:34 +0000 (20:19 +0900)
committerhyeongseok.heo <hyeongseok.heo@samsung.com>
Thu, 14 Nov 2013 11:19:34 +0000 (20:19 +0900)
In case of no argument(sub-command) is submitted , do not set
--current-workspace-path option which is raise error at parsing
argument.

Change-Id: I70dbcdb82820b69fae3a2568c3f4a0c5a7960101
Signed-off-by: hyeongseok.heo <hyeongseok.heo@samsung.com>
org.tizen.ncli.ide/tizen.sh

index 419ffe9..61bf5ce 100755 (executable)
@@ -21,7 +21,14 @@ for ARG in "$@" ; do
        ARGS="$ARGS $(escapeSpace $ARG)"
 done
 
-ARGS="$ARGS --current-workspace-path $CURRENT_WORKSPACE_PATH"
+#Check if sub-command is entered - first argument MUST be sub-command!
+#If there is no sub-command , do not set --current-workspace-path option.
+# @Added by Harry Hyeongseok Heo
+# 2013.11.14
+if test $ARGS
+then ARGS="$ARGS --current-workspace-path $CURRENT_WORKSPACE_PATH"
+else ARGS=""
+fi
 
 MAIN=org.tizen.ncli.ide.shell.Main