fix(launcher): avoid calling missing retry helper in packaged installs
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / linter-shell (push) Has been cancelled
Mark stable commit / linter-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / linter-shell (push) Has been cancelled
Mark stable commit / linter-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
- Load GitHub 403 retry helper only when available - Fallback to plain `nix run` if retry function is not defined - Prevent exit 127 when pkgmgr launcher is installed without retry script - Fix E2E failure for `pkgmgr update pkgmgr --system` https://chatgpt.com/share/693efd23-8b60-800f-adbb-9dfffc33f1f7
This commit is contained in:
@@ -13,9 +13,6 @@ if [[ ! -f "${RETRY_LIB}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck source=./scripts/nix/lib/retry_403.sh
|
||||
source "${RETRY_LIB}"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Try to ensure that "nix" is on PATH (common locations + container user)
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -47,8 +44,12 @@ fi
|
||||
# ---------------------------------------------------------------------------
|
||||
# Primary path: use Nix flake if available (with GitHub 403 retry)
|
||||
# ---------------------------------------------------------------------------
|
||||
if command -v nix >/dev/null 2>&1; then
|
||||
if declare -F run_with_github_403_retry >/dev/null; then
|
||||
# shellcheck source=./scripts/nix/lib/retry_403.sh
|
||||
source "${RETRY_LIB}"
|
||||
exec run_with_github_403_retry nix run "${FLAKE_DIR}#pkgmgr" -- "$@"
|
||||
else
|
||||
exec nix run "${FLAKE_DIR}#pkgmgr" -- "$@"
|
||||
fi
|
||||
|
||||
echo "[launcher] ERROR: 'nix' binary not found on PATH after init."
|
||||
|
||||
Reference in New Issue
Block a user