Skip to content

Commit 5abcdae

Browse files
committed
test: print stderr output on failure
1 parent f362c5f commit 5abcdae

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rewatch/tests/legacy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ cd ../testrepo/packages/compiled-by-legacy
33

44
bold "Test: It should use the legacy build system"
55

6-
if rewatch_legacy clean &> /dev/null;
6+
error_output=$(rewatch_legacy clean 2>&1 >/dev/null)
7+
8+
if [ $? -eq 0 ];
79
then
810
success "Test package cleaned"
911
else
1012
error "Error cleaning test package"
13+
printf "%s\n" "$error_output" >&2
1114
exit 1
1215
fi
1316

14-
if rewatch_legacy build &> /dev/null;
17+
error_output=$(rewatch_legacy build 2>&1 >/dev/null)
18+
19+
if [ $? -eq 0 ];
1520
then
1621
success "Test package built"
1722
else
1823
error "Error building test package"
24+
printf "%s\n" "$error_output" >&2
1925
exit 1
2026
fi
2127

0 commit comments

Comments
 (0)