You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
update-nixpkgs-inputs: failed updates still exit 0 — and the .sh wrapper would re-run the whole update once that is fixed #598
scripts/update-nixpkgs-inputs.py counts failed nix flake update runs in its summary but always exits 0 — main() never calls sys.exit with a failure status, so a run where every input failed is indistinguishable from a fully successful one to any caller.
Evidence
Verified on main ead788e1 with a stub nix on PATH that always fails (exit 1), a minimal flake.lock with one github:NixOS/nixpkgs input (nixos-unstable), script copied to a scratch dir (it resolves the repo dir from its own location):
The relevant code: update_input() returns result.returncode == 0 (line ~123), failures are appended with "status": "failed" in main(), and main() falls off the end — there is no sys.exit(...) anywhere in the file.
Why it matters
A caller chaining on success (./scripts/update-nixpkgs-inputs.py && git commit ..., a CI step, a cron/systemd unit) proceeds as if the inputs were updated when they were not. The ROADMAP describes the flake inputs as "kept current by a daily job" — a silently-green failure is exactly how pins quietly go stale.
The wrapper scripts/update-nixpkgs-inputs.sh runs "$SCRIPT" "$@" || python3 "$SCRIPT" "$@": today the || fallback can never mean "the update failed", because the script never reports failure. If the exit code is fixed naively, the wrapper would instead re-run the whole update a second time under python3 after a genuine failure (double nix flake update side effects, and the second run's up-to-date summary masking the first run's failures). The two files need to change together: the wrapper's fallback should trigger only when the script cannot execute at all (exit 126/127, e.g. uv missing for the env -S uv run --script shebang), not on an update failure.
Acceptance criteria
update-nixpkgs-inputs.py exits non-zero when any input's update failed (all refs/categories processed first; the summaries still print), and exits 0 when everything updated or was already up-to-date, including the "no inputs found" case.
update-nixpkgs-inputs.sh does not re-run the update after a genuine failure exit; its python3 fallback still covers the cannot-execute case, and it propagates the script's exit status.
Repro above: with the failing stub nix, the script prints Failed: 1 and exits non-zero; with a succeeding stub nix, it exits 0.
No change to discovery, filtering, or summary formatting for the success paths.
Single-repo: the script exists only in this repo (checked the opencode/openchamber/nix clones).
Activity
treefmt: ruff-format the exit-code tally (#598)
fix(pkgs/id): port the #598 exit-code fix to the pkgs/id update-nixpk…