xtask: Add instructions for installing cargo-sort

This commit is contained in:
Kévin Commaille 2022-03-18 13:50:54 +01:00 committed by Kévin Commaille
parent e2375ed72e
commit eef68d7d4b

View File

@ -177,6 +177,12 @@ impl CiTask {
/// Check the sorting of dependencies with the nightly version.
fn dependencies(&self) -> Result<()> {
if cmd!("cargo sort --version").run().is_err() {
return Err(
"Could not find cargo-sort. Install it by running `cargo install cargo-sort`"
.into(),
);
}
cmd!(
"
rustup run nightly cargo sort