mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 16:46:31 +03:00
launcher: export skill-dir env before the IMPECCABLE_BIN exec (sync engine fix)
Prepared with AI assistance (Claude Code).
This commit is contained in:
@@ -25,19 +25,23 @@ probe_ok() {
|
||||
}
|
||||
probing=${IMPECCABLE_LAUNCHER_PROBE:-}
|
||||
|
||||
if [ -n "${IMPECCABLE_BIN:-}" ] && [ -x "${IMPECCABLE_BIN}" ]; then
|
||||
exec "${IMPECCABLE_BIN}" "$@"
|
||||
fi
|
||||
|
||||
dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
|
||||
# What the binary needs to know about its home: the skill directory (for
|
||||
# reference/*.md and command-metadata.json) and how to name itself in the
|
||||
# commands it prints.
|
||||
# commands it prints. Exported BEFORE any exec below, including the
|
||||
# IMPECCABLE_BIN override: an engine binary reached with no IMPECCABLE_SKILL_DIR
|
||||
# cannot find reference/*.md (so native platform refs never inline) or read its
|
||||
# own version (so UPDATE_AVAILABLE never fires). Setting it here covers every
|
||||
# candidate the launcher can exec.
|
||||
: "${IMPECCABLE_SKILL_DIR:=$(CDPATH= cd -- "$dir/.." && pwd)}"
|
||||
: "${IMPECCABLE_SELF:=$0}"
|
||||
export IMPECCABLE_SKILL_DIR IMPECCABLE_SELF
|
||||
|
||||
if [ -n "${IMPECCABLE_BIN:-}" ] && [ -x "${IMPECCABLE_BIN}" ]; then
|
||||
exec "${IMPECCABLE_BIN}" "$@"
|
||||
fi
|
||||
|
||||
case "$(uname -s 2>/dev/null || echo unknown)" in
|
||||
Darwin) os=darwin ;;
|
||||
Linux) os=linux ;;
|
||||
|
||||
Reference in New Issue
Block a user