Commit ddf56264 authored by SBassett's avatar SBassett
Browse files

More testing of trapping exit

parent a230ad65
Pipeline #1380 passed with stage
in 49 seconds
......@@ -16,6 +16,7 @@ npm_audit_dependency_check:
file_list=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA -- \
{*package.json,*package-lock.json,*/package.json,*/package-lock.json})
TOTAL_EXIT_CODES=0
for f in $file_list; do
npm_dir="$(dirname "$f")"
cd $root_dir/$npm_dir
......@@ -24,10 +25,14 @@ npm_audit_dependency_check:
echo -e "----- $f -----"
echo -e "\n "
set -e
TOTAL_EXIT_CODES=0
EXIT_CODE=0
audit-ci ${NPM_AUDIT_OPTIONS} || EXIT_CODE=$EXIT_CODE + $?
audit-ci ${NPM_AUDIT_OPTIONS} || EXIT_CODE=$?
TOTAL_EXIT_CODES=$(($TOTAL_EXIT_CODES + $EXIT_CODE))
done
if [ "$TOTAL_EXIT_CODES" -gt 0 ]; then
exit 1
fi
# only run on changes to package and package.lock .json
only:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment