We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check-fmt.sh
1 parent 377e480 commit 0f19f71Copy full SHA for 0f19f71
contrib/scripts/check-fmt.sh
@@ -2,6 +2,7 @@
2
3
set -euo pipefail
4
5
+version="nightly-2024-01-11"
6
flags=""
7
8
# Check if "check" is passed as an argument
@@ -10,8 +11,7 @@ if [[ "$#" -gt 0 && "$1" == "check" ]]; then
10
11
fi
12
13
# Install toolchain
-rustup install nightly-2024-01-11
14
-rustup component add rustfmt --toolchain nightly-2024-01-11
+cargo +$version --version || (rustup install $version && rustup component add rustfmt --toolchain $version)
15
16
# Check workspace crates
17
-cargo +nightly-2024-01-11 fmt --all -- --config format_code_in_doc_comments=true $flags
+cargo +$version fmt --all -- --config format_code_in_doc_comments=true $flags
0 commit comments