Skip to content

Commit

Permalink
Fix test-all.sh : properly exit on any extension error
Browse files Browse the repository at this point in the history
  • Loading branch information
Telroshan committed May 26, 2024
1 parent 73675c6 commit 629803a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ for dir in $SCRIPT_DIR/../src/*; do
if [ -d "$dir/test" ]; then
(
cd "$dir"
npm i -D && npm t || { echo "ERRORS in $(basename "$dir")"; exit $?; }
cd ../..
npm i -D && npm t
)
# Check the exit status of the subshell
if [ $? -ne 0 ]; then
echo "ERRORS in $(basename "$dir")"
exit 1
fi
cd ../..
else
echo "$(basename "$dir") doesn't have any test, skipping"
fi
Expand Down

0 comments on commit 629803a

Please sign in to comment.