Skip to content

Commit 8a5abbb

Browse files
committed
fix: better check-updates logging
1 parent 3f319c6 commit 8a5abbb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

bin/sparkdock.macos

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ check_for_updates() {
4545
REMOTE=$(git rev-parse origin/${DEFAULT_BRANCH})
4646

4747
if [ "$LOCAL" != "$REMOTE" ]; then
48-
echo "Updates available:"
49-
git --no-pager log --oneline HEAD..origin/${DEFAULT_BRANCH}
48+
DIFF=$(git --no-pager log --oneline HEAD..origin/${DEFAULT_BRANCH})
49+
if [ -n "$DIFF" ]; then
50+
echo "Updates available:"
51+
echo "$DIFF"
52+
fi
5053
return 0
5154
fi
5255
return 1

0 commit comments

Comments
 (0)