fix: Resolve REPO_ROOT pointing to skills dir instead of repo root

improve.sh was setting REPO_ROOT to its own directory, causing
manifest.json lookups and git commands to fail silently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
B 2026-02-09 16:13:21 +00:00
parent b8689fdbec
commit 8a7317d749
2 changed files with 3 additions and 2 deletions

View file

@ -14,7 +14,8 @@
set -eo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
MANIFEST="${REPO_ROOT}/manifest.json"
MODE="${1:-once}"

View file

@ -34,7 +34,7 @@ async function runScript(reason: string) {
);
try {
const proc = Bun.spawn(["bash", TARGET_SCRIPT], {
cwd: TARGET_SCRIPT.substring(0, TARGET_SCRIPT.lastIndexOf("/")) || ".",
cwd: process.env.REPO_ROOT || TARGET_SCRIPT.substring(0, TARGET_SCRIPT.lastIndexOf("/")) || ".",
stdout: "inherit",
stderr: "inherit",
});