From c670ab35c85bd00e4a64f4ab8f94bfe6de9d61b8 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 19:45:53 -0700 Subject: [PATCH] fix(tools): format-all passes its own arguments on when it re-runs inside the dev shell format-all re-executes itself under 'nix develop' to get the nightly rustfmt, but it did so after its argument loop had shifted every argument away, so the re-run always used the defaults (--check, all trees): '--apply' silently only checked. The original arguments are now saved before parsing and passed on. Found when applying the final formatting of candidate 8: '--apply --tree windows' printed diffs and changed nothing. Verified: bash -n; the revisions after this one are the result of running --apply. --- tools/format-all | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/format-all b/tools/format-all index eb6c1a30..79127f6a 100755 --- a/tools/format-all +++ b/tools/format-all @@ -21,6 +21,7 @@ # pinned rust-overlay; another nightly may format a little differently). set -uo pipefail +orig_args=("$@") mode=check tree=all root=$(cd "$(dirname "$0")/.." && pwd) @@ -41,7 +42,7 @@ if [ -z "${RUSTFMT:-}" ]; then if rustfmt --version 2>/dev/null | grep -q nightly; then RUSTFMT=rustfmt elif [ -z "${FORMAT_ALL_IN_SHELL:-}" ] && command -v nix >/dev/null; then - FORMAT_ALL_IN_SHELL=1 exec nix develop "$root" --command "$0" "$@" --root "$root" + FORMAT_ALL_IN_SHELL=1 exec nix develop "$root" --command "$0" "${orig_args[@]}" --root "$root" else echo "format-all: no nightly rustfmt (set RUSTFMT)" >&2; exit 2 fi