Skip to content

Commit 2ed1742

Browse files
authored
Fix: Remove extra spaces in rewatch legacy test output and reset changed file. (#7585)
1 parent 9b49787 commit 2ed1742

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rewatch/tests/legacy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ else
4141
fi
4242

4343
error_output=$(rewatch_legacy format -all 2>&1 >/dev/null)
44-
git_diff_file_count=$(git diff --name-only ./ | wc -l)
44+
git_diff_file_count=$(git diff --name-only ./ | wc -l | xargs)
4545
if [ $? -eq 0 ] && [ $git_diff_file_count -eq 1 ];
4646
then
4747
success "Test package formatted. Got $git_diff_file_count changed files."
48+
git restore .
4849
else
4950
error "Error formatting test package"
5051
echo $error_output

0 commit comments

Comments
 (0)