diff --git a/.github/workflows/npm_audit.yml b/.github/workflows/npm_audit.yml index bfe66875f..e2ae6c9d4 100644 --- a/.github/workflows/npm_audit.yml +++ b/.github/workflows/npm_audit.yml @@ -35,12 +35,9 @@ jobs: npm audit --package-lock-only --loglevel=error; # The npm audit command will exit with a 0 exit code if no vulnerabilities were found. - if [ $? -eq 0 ]; then echo "CREATE_PR=false" >> $GITHUB_OUTPUT; echo "Variable should be 0: $?"; else echo "CREATE_PR=true" >> $GITHUB_OUTPUT; echo "Variable should be 1: $?"; fi; + if [ $? -eq 0 ]; then echo "CREATE_PR=false" >> $GITHUB_OUTPUT; else echo "CREATE_PR=true" >> $GITHUB_OUTPUT; fi; set -e - - name: Debugging the variable - run: echo "The variable is ${{ steps.npm_audit.outputs.CREATE_PR }}" - - name: Run npm audit fix if: steps.npm_audit.outputs.CREATE_PR == 'true' run: npm audit fix --package-lock-only --loglevel=error;