File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1818# Check Cabal files with cabal-fmt
1919echo " Formatting Cabal source files with cabal-fmt version ${cabal_fmt_required_version} "
2020# shellcheck disable=SC2016
21- if ! git ls-files --exclude-standard --no-deleted --deduplicate ' *.cabal' | xargs -L 1 sh -c ' echo "$0" && cabal-fmt -i "$0"' ; then
21+ if ! git ls-files --exclude-standard --no-deleted --deduplicate ' *.cabal' | xargs -L 1 sh -c ' echo "$0" && cabal-fmt -c "$0" 2>/dev/null || (cabal-fmt - i "$0" && exit 1) ' ; then
2222 exit 1
2323fi
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ if [ ! "${unstaged_cabal_files}" = "" ]; then
2222fi
2323
2424# Run various checks and formatters
25- ./scripts/check-cabal.sh
26- ./scripts/format-cabal.sh
27- ./scripts/format-stylish.sh
25+ ./scripts/check-cabal.sh || exit 1
26+ ./scripts/format-cabal.sh || exit 1
27+ ./scripts/format-stylish.sh || exit 1
You can’t perform that action at this time.
0 commit comments