From 1ec175a35e0b960633578dedafc8118883974ae7 Mon Sep 17 00:00:00 2001
From: Andrew Jiang <andrew@buildwithfern.com>
Date: Sat, 14 Sep 2024 03:02:45 -0400
Subject: [PATCH] add ignore-docs-bundle-build

---
 scripts/ignore-docs-bundle-build.sh | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/scripts/ignore-docs-bundle-build.sh b/scripts/ignore-docs-bundle-build.sh
index 045f5f3e3c..57fc184ae2 100755
--- a/scripts/ignore-docs-bundle-build.sh
+++ b/scripts/ignore-docs-bundle-build.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env sh
+
 if [ "$VERCEL_ENV" == "preview" ]; then
   PATH=$(pnpm list --filter=@fern-ui/docs-bundle --depth -1 --json | jq -r '.[].path')
 
@@ -7,14 +9,9 @@ if [ "$VERCEL_ENV" == "preview" ]; then
 
   DEPS=$(pnpm list --filter=@fern-ui/docs-bundle --only-projects --prod --recursive --depth=Infinity --json | jq -r '[.. | objects | select(.version | .!=null) | select(.version | startswith("link:")) | .path] | unique | .[]')
 
-  if [ -n "$DEPS" ]; then
-    for DEP in $DEPS; do
-      if [ "$(git diff --quiet HEAD^ HEAD -- $DEP)" ]; then
-        exit 1
-      fi
-    done
+  if [ "$(git diff --quiet HEAD^ HEAD -- $PATH)" ]; then
+    exit 1
   fi
-
-else
-  exit 0
 fi
+
+exit 0