Skip to content

Commit fb48bd0

Browse files
authored
fix(ignore): Fix update check (#26723)
1 parent db578d9 commit fb48bd0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

update.sh

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/usr/bin/env bash
22
cd "$(dirname "$0")"
33

4-
NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
5-
6-
if [ "$NEW_COMMITS" -gt "0" ]; then
7-
echo "Update available!"
8-
else
9-
echo "No update available."
10-
exit 0
4+
if [ "$1" != "force" ]; then
5+
git fetch
6+
NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
7+
if [ "$NEW_COMMITS" -gt "0" ]; then
8+
echo "Update available!"
9+
else
10+
echo "No update available. Use '$0 force' to skip the check."
11+
exit 0
12+
fi
1113
fi
1214

1315
NEED_RESTART=0

0 commit comments

Comments
 (0)