mirror of https://github.com/garrytan/gstack.git
fix(setup): BROWSE_BIN carries the .exe suffix on Windows
On Windows, `bun build --compile` emits browse.exe, but setup's BROWSE_BIN pointed at the suffixless path — so the post-build gate (`[ ! -x "$BROWSE_BIN" ]` → "browse binary missing") could never pass on Windows even after a fully successful build, while the build step itself reported success. Closes #2291. Applied the PR's override after the IS_WINDOWS detection, and also to the second BROWSE_BIN assignment the PR predates: the direct-Codex- install migration path re-derives BROWSE_BIN from the migrated dir and would otherwise drop the suffix again on Windows. Contributed by @rroojrooj (PR #1714). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
39ed173fdc
commit
b8c4399afe
10
setup
10
setup
|
|
@ -30,6 +30,11 @@ case "$(uname -s)" in
|
||||||
MINGW*|MSYS*|CYGWIN*|Windows_NT) IS_WINDOWS=1 ;;
|
MINGW*|MSYS*|CYGWIN*|Windows_NT) IS_WINDOWS=1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Windows: binaries are compiled with .exe suffix
|
||||||
|
if [ "$IS_WINDOWS" -eq 1 ]; then
|
||||||
|
BROWSE_BIN="$SOURCE_GSTACK_DIR/browse/dist/browse.exe"
|
||||||
|
fi
|
||||||
|
|
||||||
# ─── Symlink-or-copy helper ───────────────────────────────────
|
# ─── Symlink-or-copy helper ───────────────────────────────────
|
||||||
# On macOS/Linux: create a symlink (existing behavior).
|
# On macOS/Linux: create a symlink (existing behavior).
|
||||||
# On Windows without Developer Mode (MSYS2/Git Bash): plain ln -snf silently
|
# On Windows without Developer Mode (MSYS2/Git Bash): plain ln -snf silently
|
||||||
|
|
@ -243,6 +248,11 @@ migrate_direct_codex_install() {
|
||||||
INSTALL_GSTACK_DIR="$migrated_dir"
|
INSTALL_GSTACK_DIR="$migrated_dir"
|
||||||
INSTALL_SKILLS_DIR="$(dirname "$INSTALL_GSTACK_DIR")"
|
INSTALL_SKILLS_DIR="$(dirname "$INSTALL_GSTACK_DIR")"
|
||||||
BROWSE_BIN="$SOURCE_GSTACK_DIR/browse/dist/browse"
|
BROWSE_BIN="$SOURCE_GSTACK_DIR/browse/dist/browse"
|
||||||
|
# Windows: binaries are compiled with .exe suffix (same as the top-level
|
||||||
|
# BROWSE_BIN assignment — this re-derivation must not drop the suffix).
|
||||||
|
if [ "$IS_WINDOWS" -eq 1 ]; then
|
||||||
|
BROWSE_BIN="$SOURCE_GSTACK_DIR/browse/dist/browse.exe"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$INSTALL_CODEX" -eq 1 ]; then
|
if [ "$INSTALL_CODEX" -eq 1 ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue