Improve deploy error message 95/5295/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 23 Jun 2017 15:08:43 +0000 (11:08 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 23 Jun 2017 15:14:08 +0000 (11:14 -0400)
The previous error message states that there are missing arguments
however if the user provides more arguments than necessary it still
fails with the same error. This patch attempts to make the error message
more helpful to the user.

Change-Id: I6e5967f098a98bb7b141635ce8358bc5de4a89e4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
shell/deploy

index 575c9d6..b25d439 100755 (executable)
@@ -341,7 +341,8 @@ deploy_maven_file () {
     local file="$3"
 
     if [ "$#" -ne "3" ]; then
-        echo "Missing required arguments."
+        echo "ERROR: $# arguments passed. This function expects 3 required arguments."
+        deploy_maven_file_usage
         exit 1
     fi