Skip to content

Commit 0da6bd1

Browse files
authored
Merge pull request #51493 from samzong/fix/lsync-diff_oupt
fix(scripts/lsync): fix show diff output if changes exist
2 parents 900d48e + 36d5432 commit 0da6bd1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/lsync.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [ -d "$1" ] ; then
3737
echo "$1 is still in sync"
3838
exit 0
3939
fi
40-
exit 1
40+
exit 0
4141
fi
4242

4343
LOCALIZED="$1"
@@ -52,9 +52,11 @@ fi
5252
# Last commit for the localized path
5353
LASTCOMMIT=$(git log -n 1 --pretty=format:%h -- "$LOCALIZED")
5454

55-
diff_output=$(git diff --quiet "$LASTCOMMIT...HEAD" -- "$EN_VERSION" || echo "changed")
55+
DIFF_OUTPUT=$(git diff --color=always "$LASTCOMMIT...HEAD" -- "$EN_VERSION")
5656

57-
if [ -z "$diff_output" ]; then
57+
if [ -z "$DIFF_OUTPUT" ]; then
5858
echo "$LOCALIZED is still in sync"
5959
exit 0
60+
else
61+
printf "%s\n" "$DIFF_OUTPUT"
6062
fi

0 commit comments

Comments
 (0)