Skip to content

Commit 9ab151f

Browse files
committed
Improved error message
1 parent a7c724a commit 9ab151f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,21 @@ jobs:
9999
- name: Check number of dynamic libraries hasn't changed
100100
if: matrix.os == 'ubuntu-latest'
101101
run: |
102+
DYLIBS=$(ldd ./target/x86_64-unknown-linux-gnu/debug/tmc-langs-cli)
102103
EXPECTED=5
103-
ACTUAL=$(ldd ./target/x86_64-unknown-linux-gnu/debug/tmc-langs-cli | wc -l)
104+
ACTUAL=$($DYLIBS | wc -l)
104105
if [ $ACTUAL -ne $EXPECTED ]; then
105-
echo "::error title=unexpected-dynamic-libraries::Expected $EXPECTED dynamic libraries, found $ACTUAL"
106+
echo "::error title=unexpected-dynamic-libraries::Expected $EXPECTED dynamic libraries, found $ACTUAL ($DYLIBS)"
106107
exit 1
107108
fi
108109
109110
- name: Check number of dynamic libraries hasn't changed
110111
if: matrix.os == 'macos-latest'
111112
run: |
113+
DYLIBS=$(otool -L ./target/aarch64-apple-darwin/debug/tmc-langs-cli)
112114
EXPECTED=5
113-
ACTUAL=$(otool -L ./target/aarch64-apple-darwin/debug/tmc-langs-cli | wc -l)
115+
ACTUAL=$($DYLIBS | wc -l)
114116
if [ $ACTUAL -ne $EXPECTED ]; then
115-
echo "::error title=unexpected-dynamic-libraries::Expected $EXPECTED dynamic libraries, found $ACTUAL"
117+
echo "::error title=unexpected-dynamic-libraries::Expected $EXPECTED dynamic libraries, found $ACTUAL ($DYLIBS)"
116118
exit 1
117119
fi

0 commit comments

Comments
 (0)