summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-10-14 09:17:27 +0300
committerLars Wirzenius <liw@liw.fi>2020-10-14 09:17:27 +0300
commit64a17b4927c4579d25692d15a8f0669adcf82fd2 (patch)
tree2c1e9daec4a05b789263ec8bde730b4214912796
parent9e840403a3b52755b57a7a49b3cdef14d13caee7 (diff)
downloadewww-64a17b4927c4579d25692d15a8f0669adcf82fd2.tar.gz
fix: only run cargo fmt, if it's available
-rwxr-xr-xcheck5
1 files changed, 4 insertions, 1 deletions
diff --git a/check b/check
index deda000..53b1ee3 100755
--- a/check
+++ b/check
@@ -51,7 +51,10 @@ then
cargo clippy $quiet
fi
$hideok cargo test $quiet
-$hideok cargo fmt -- --check
+if cargo fmt --help > /dev/null 2> /dev/null
+then
+ $hideok cargo fmt -- --check
+fi
$hideok ./mktestcert test.key test.pem hunter2