From 07b9a922ba719488bf355f504b8d937520705fcd Mon Sep 17 00:00:00 2001 From: mars Date: Sat, 26 Nov 2022 22:07:27 -0700 Subject: [PATCH] Dedent check_licenses.sh continue --- check_licenses.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/check_licenses.sh b/check_licenses.sh index f06bcd6..63f1985 100755 --- a/check_licenses.sh +++ b/check_licenses.sh @@ -13,14 +13,11 @@ dir="$(pwd | sed 's/\//\n/g' | tail -n 1)" for toml in $(find "$PWD" -name "Cargo.toml"); do printf "Project: %s\n" "$(tomcat package.name "$toml")" - set +e # disable error propogation to catch tomcat exit code - toml_lic="$(tomcat package.license "$toml")" - if ! [ "$?" = "0" ]; then + if ! [ "$(toml_lic="$(tomcat package.license "$toml" && printf "%s\n" "$?")")" = "0" ]; then printf "%s: Missing license information\n" "$(printf "%s\n" "$toml" |\ sed "s/^.\+$dir\///g")" - continue + continue fi - set -e # re-enable error propogation for the rest of the script for file in $(find "$(printf "%s\n" "$toml" |\ sed 's/Cargo\.toml/src/g')" -name "*.rs")