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 }