Skip to content

Commit eedc71d

Browse files
committed
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 NixOS/nix#11438
1 parent bb0eb38 commit eedc71d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

builtinModules/formatter.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ in
4242
in
4343
pkgs.writeShellScriptBin "formatter" ''
4444
PATH=${if fullContext then "" else makeBinPath packages}
45+
if [ $# -eq 0 ]; then exec "$0" .; fi
4546
for f in "$@"; do
4647
if [ -d "$f" ]; then
4748
${fd}/bin/fd "$f" -Htf -x "$0" &

0 commit comments

Comments
 (0)