Files
gstack/browse/bin/find-browse
Garry Tan cb11783253 refactor: remove version check from find-browse, simplify to binary locator
Delete checkVersion(), readCache(), writeCache(), fetchRemoteSHA(),
resolveSkillDir(), CacheEntry interface, REPO_URL/CACHE_PATH/CACHE_TTL
constants, and META output from find-browse.ts.

Version checking is now handled by bin/gstack-update-check (previous commit).
2026-03-13 23:57:13 -05:00

18 lines
722 B
Bash
Executable File

#!/bin/bash
# Shim: delegates to compiled find-browse binary, falls back to basic discovery.
# The compiled binary handles git root detection for workspace-local installs.
DIR="$(cd "$(dirname "$0")/.." && pwd)/dist"
if test -x "$DIR/find-browse"; then
exec "$DIR/find-browse" "$@"
fi
# Fallback: basic discovery
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -n "$ROOT" ] && test -x "$ROOT/.claude/skills/gstack/browse/dist/browse"; then
echo "$ROOT/.claude/skills/gstack/browse/dist/browse"
elif test -x "$HOME/.claude/skills/gstack/browse/dist/browse"; then
echo "$HOME/.claude/skills/gstack/browse/dist/browse"
else
echo "ERROR: browse binary not found. Run: cd <skill-dir> && ./setup" >&2
exit 1
fi