From: Thanh Ha Date: Thu, 16 Jan 2020 00:18:18 +0000 (-0500) Subject: Ignore shellcheck SC2012 use find instead of ls X-Git-Tag: v0.50.0~19 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=29db2fd816d8fe8310e208e70ce203be03c53980;p=releng%2Fglobal-jjb.git Ignore shellcheck SC2012 use find instead of ls It's reasonable to ignore this here as we're just piping ls to wc to get a file count. The list of filenames is not being parsed in anyway in this case. SC2012: Use find instead of ls to better handle non-alphanumeric filenames. Signed-off-by: Thanh Ha Change-Id: I0687b24816c2b4920893162297cd318f813d7109 --- diff --git a/shell/release-job.sh b/shell/release-job.sh index 55276887..ccaa7824 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -384,6 +384,7 @@ pypi_release_file(){ echo "WARN: failed to download source distribution" fi echo "INFO: Checking files in $tgtdir" + # shellcheck disable=SC2012 filecount=$(ls $tgtdir | wc -l) if [[ $filecount = 0 ]] ; then echo "ERROR: no files downloaded"