From: Thanh Ha Date: Fri, 23 Jun 2017 15:08:43 +0000 (-0400) Subject: Improve deploy error message X-Git-Tag: v0.5.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F5295%2F1;p=releng%2Flftools.git Improve deploy error message 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 --- diff --git a/shell/deploy b/shell/deploy index 575c9d67..b25d4397 100755 --- a/shell/deploy +++ b/shell/deploy @@ -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