Skip to content

Commit d4bf2b1

Browse files
committed
Suppress git fetch errors in Vercel ignore script to improve log readability and clarify fallback behavior in build process.
1 parent 75fb993 commit d4bf2b1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

web/scripts/vercel-ignore.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# Skips the build when neither web/ nor common/ changed since the previous deployed commit.
44
# Kept in a script (rather than inline in vercel.json) because `ignoreCommand` is capped at 256 chars.
55

6-
git fetch origin --unshallow || git fetch origin --deepen=200 || true
6+
# Vercel's build container has no fetchable `origin`, so both of these always fail there and the
7+
# script falls through to building — the safe direction. Kept for local and other-CI runs where the
8+
# history *is* fetchable. stderr is dropped so two `fatal:` lines do not make a healthy deploy look
9+
# like a broken one.
10+
git fetch origin --unshallow 2>/dev/null || git fetch origin --deepen=200 2>/dev/null || true
711

812
echo "prev=$VERCEL_GIT_PREVIOUS_SHA cur=$VERCEL_GIT_COMMIT_SHA"
913

0 commit comments

Comments
 (0)