Support nix 2.25 in formatter

Nix 2.25 changes the args passed to the formatter, so we now need to
handle an empty args.

See https://github.com/NixOS/nix/pull/11438
This commit is contained in:
Archit Gupta 2025-01-15 10:12:59 -08:00
parent bb0eb381fd
commit eedc71d648

View File

@ -42,6 +42,7 @@ in
in
pkgs.writeShellScriptBin "formatter" ''
PATH=${if fullContext then "" else makeBinPath packages}
if [ $# -eq 0 ]; then exec "$0" .; fi
for f in "$@"; do
if [ -d "$f" ]; then
${fd}/bin/fd "$f" -Htf -x "$0" &