From 504409d75b0ebce07606e5bb2a7d0279131df225 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 16 Aug 2026 10:45:17 -0700 Subject: [PATCH] fix(build): convert MSYS paths for Bun in the Windows server-bundle build (#2452) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit browse/scripts/build-node-server.sh resolves GSTACK_DIR with pwd, which under MSYS/Git Bash yields a /c/... style absolute path that Bun cannot open ('FileNotFound opening root directory') — the Windows Node-server bundle build died at the first bun build. Convert via cygpath -m on MINGW/MSYS/CYGWIN before deriving SRC_DIR/DIST_DIR. Re-derived from PR #2452, taking only the cygpath build half — the PR's icacls principal-ambiguity half already landed on main (browse/src/file-permissions.ts's SID-form principal). Verified the build bug still exists on current code before absorbing (build-node-server.sh:10 had no conversion). Contributed by @chiragborse1. Co-authored-by: chiragborse1 Co-Authored-By: Claude Fable 5 --- browse/scripts/build-node-server.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browse/scripts/build-node-server.sh b/browse/scripts/build-node-server.sh index 342ac64c7..c7b1b09b7 100755 --- a/browse/scripts/build-node-server.sh +++ b/browse/scripts/build-node-server.sh @@ -8,6 +8,11 @@ set -e GSTACK_DIR="$(cd "$(dirname "$0")/../.." && pwd)" +# Windows (MSYS/Git Bash): convert to a Windows-style path — Bun cannot open +# MSYS /c/... absolute paths ("FileNotFound opening root directory"). +case "$(uname -s)" in + MINGW*|MSYS*|CYGWIN*) GSTACK_DIR="$(cygpath -m "$GSTACK_DIR")" ;; +esac SRC_DIR="$GSTACK_DIR/browse/src" DIST_DIR="$GSTACK_DIR/browse/dist" mkdir -p "$DIST_DIR"