mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 16:34:00 +01:00
fix: harness hosts run in place from the checkout in --status
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
7518f14ca8
commit
01fc8534ac
2 files changed
+8
-3
No files matched your search
@@ -33,11 +33,13 @@
|
||||
# (#3084): print the commands that move it out first and return 0. A symlinked
|
||||
# ~/.claude/skills/gstack that points at SRC becomes the checkout itself.
|
||||
# Kiro writes its runtime files into ROOT in place, which would link the
|
||||
# checkout into itself, so it counts too. Claude installs in place from the
|
||||
# checkout, and a ROOT that is a symlink is replaced as a link: those return 1.
|
||||
# checkout into itself, so it counts too. Claude and the harness hosts
|
||||
# (OpenClaw, Hermes: gstack-harness copies skills that call the checkout) run
|
||||
# in place from the checkout, and a ROOT that is a symlink is replaced as a
|
||||
# link: those return 1.
|
||||
gstack_install_move_hint() {
|
||||
local src="$1" host="$2" root="$3" claude_link="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/gstack"
|
||||
[ "$host" = claude ] && return 1
|
||||
case "$host" in claude|openclaw|hermes) return 1 ;; esac
|
||||
[ -L "$root" ] && return 1
|
||||
command -v gstack_path_within >/dev/null 2>&1 && gstack_path_within "$src" "$root" || return 1
|
||||
if [ -L "$claude_link" ] && gstack_path_same "$claude_link" "$src"; then
|
||||
|
||||
@@ -232,6 +232,9 @@ describe.skipIf(process.platform === 'win32')('setup and uninstall with harnesse
|
||||
expect(r.stdout.trim().split('\n').at(-1)).toBe('gstack ready (' + host + ')');
|
||||
const again = runSetup(f, path.join(src, 'setup'), ['--host', host]);
|
||||
expect(again.stdout + again.stderr).toMatch(new RegExp('\\b' + host + '\\s+experimental\\s+global\\s+unchanged'));
|
||||
const status = runSetup(f, path.join(src, 'setup'), ['--status']);
|
||||
expect(status.stdout).toMatch(new RegExp('\\b' + host + '\\s+experimental\\s+global\\s+current'));
|
||||
expect(status.stdout).not.toContain('move it first');
|
||||
const un = spawnSync('bash', [path.join(src, 'bin/gstack-uninstall'), '--force'], { cwd: f.home, env: { ...f.env, PATH: '/usr/bin:/bin' }, encoding: 'utf8', timeout: 60_000 });
|
||||
expect(un.status, un.stdout + un.stderr).toBe(0);
|
||||
expect(files(path.join(f.home, dest)).filter(p => !p.startsWith('.'))).toEqual([]);
|
||||
|
||||
Reference in new issue
Block a user