job4: fix toggle-external logical cd (BLK-006 class)
REPO resolution changed from a logical `cd` to `cd -P` (BLK-006 class:
direct invocation via a symlinked path — the real ~/.claude/lib ->
<repo>/lib layout — was resolving REPO to the symlink's logical parent
instead of the physical repo root). Combined with the REPO seam
(§3.2): TOGGLE_EXTERNAL_REPO_OVERRIDE env var, same pattern as the
other SEAMS-bundle files, zero other logic change (diff is one line).
Closes J4-20 (UNTESTABLE + latent bug). Previous commit ("test
toggle-external logical cd (red)") proved the bug live via the new
lib/tests/toggle-external-repo-resolution.test.sh: `status
emil-design-eng` through a symlinked path reported "missing" instead
of "enabled". This commit turns that test green.
Verified: shellcheck clean, bash -n clean, `bash lib/toggle-external.sh
list` against the real repo unchanged (gstack/emil-design-eng/
darwin-skill/magic enabled, find-skills missing — matches prior state).
GREEN: full `make test` exit 0, including the new test (1/1).
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
REPO="${TOGGLE_EXTERNAL_REPO_OVERRIDE:-$(cd -P "$(dirname "$0")/.." && pwd)}"
|
||||||
SKILLS_DIR="$REPO/skills"
|
SKILLS_DIR="$REPO/skills"
|
||||||
DISABLED_DIR="$REPO/skills-disabled"
|
DISABLED_DIR="$REPO/skills-disabled"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user