From 707d6beee1b396c6067af4811f9ec60d9d1821a0 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 28 Feb 2022 23:17:08 -0300 Subject: [PATCH] Add conditions --- pkgbuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index 875029e..9bf4bd0 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -29,11 +29,11 @@ namcapAnalysis() { pacman -S --noconfirm namcap namcapOutput=$(namcap PKGBUILD) - echo "::warning::$namcapOutput" + [ -n "$namcapOutput" ] && echo "::warning::$namcapOutput" if [ -f "$pkgFile" ]; then relPkgFile="$(realpath --relative-base="$baseDir" "$pkgFile")" namcapOutput=$(namcap "$pkgFile") - echo "::warning::$relPkgFile:$namcapOutput" + [ -n "$namcapOutput" ] && echo "::warning::$relPkgFile:$namcapOutput" fi }