File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ verifyCorrect() {
3535 shift
3636
3737 echo " Checking $file (${*:- no options} ) …"
38- if ! out=$( nixfmt --strict --verify " $@ " < " $file " ) ; then
38+ if ! out=$( nixfmt --strict --verify " $@ " - < " $file " ) ; then
3939 echo " [ERROR] failed nixfmt verification"
4040 exit 1
4141 fi
@@ -60,7 +60,7 @@ verifyCorrect test/correct-indent-4.nix --indent=4
6060
6161# Verify "invalid"
6262for file in test/invalid/* .nix; do
63- if nixfmt < " $file " > /dev/null 2>&1 ; then
63+ if nixfmt - < " $file " > /dev/null 2>&1 ; then
6464 echo " [ERROR] $file should have failed nixfmt"
6565 exit 1
6666 else
7171# Verify "diff"
7272for file in test/diff/** /in.nix; do
7373 echo " Checking $file …"
74- out=" $( nixfmt --verify < " $file " ) "
74+ out=" $( nixfmt --verify - < " $file " ) "
7575 outfile=" $( dirname " $file " ) /out.nix"
7676
7777 if diff --color=always --unified " $outfile " <( echo " $out " ) ; then
@@ -85,7 +85,7 @@ for file in test/diff/**/in.nix; do
8585 fi
8686
8787 echo " Checking $file with --strict …"
88- out=" $( nixfmt --strict --verify < " $file " ) "
88+ out=" $( nixfmt --strict --verify - < " $file " ) "
8989 outfile=" $( dirname " $file " ) /out-pure.nix"
9090
9191 if diff --color=always --unified " $outfile " <( echo " $out " ) ; then
You can’t perform that action at this time.
0 commit comments