Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
evmar committed Sep 15, 2024
1 parent 75d9da8 commit 56f51ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
path: |
$HOME/.dprint
$HOME/.cache/dprint
#$HOME/.cache/dprint
key: dprint

- name: install dprint
Expand Down
12 changes: 2 additions & 10 deletions misc/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,16 @@

set -e

# Look for dprint from npm and in $HOME for CI.
for path in web/node_modules/.bin/dprint $HOME/.dprint/bin/dprint dprint; do
dprint=$path
if [ -f $dprint ]; then
break
fi
done

if [ "$1" = "--check" ]; then
if ! (
cargo fmt -- --check &&
$dprint check
dprint check
); then
echo
echo "error: formatting check failed; run 'misc/fmt.sh' to fix"
exit 1
fi
else
cargo fmt
$dprint fmt
dprint fmt
fi

0 comments on commit 56f51ed

Please sign in to comment.