Skip to content

Commit 1288cb1

Browse files
committed
Fix: lint
1 parent deb75dc commit 1288cb1

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

builder/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ edition = "2021"
2525
[dependencies]
2626
clap = { version = "4.5.19", features = ["derive"] }
2727
cmd_lib = "1.9.5"
28-
current_platform = "0.2.0"
28+
current_platform = "0.2.0"

builder/src/main.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ fn quick_copy_dir<P: AsRef<OsStr>>(
200200
println!("{:#?}", &copy_process);
201201

202202
// Check for errors.
203-
let exit_status = copy_process.status().map_err(|err| -> String { format!("Error running copy process: {err}") })?;
203+
let exit_status = copy_process
204+
.status()
205+
.map_err(|err| -> String { format!("Error running copy process: {err}") })?;
204206
let exit_code = exit_status
205207
.code()
206208
.expect("Copy process terminated by signal");
@@ -288,9 +290,12 @@ fn run_install(dev: bool) -> Result<(), Box<dyn std::error::Error>> {
288290
cargo fetch;
289291
)?;
290292
if dev {
293+
// If the dist install reports an error, perhaps it's already installed.
294+
if run_cmd!(cargo install --locked cargo-dist;).is_err() {
295+
run_cmd!(dist --version;)?;
296+
}
291297
run_cmd!(
292298
cargo install --locked cargo-outdated;
293-
cargo install --locked cargo-dist;
294299
cargo install cargo-sort;
295300
)?;
296301
}
@@ -322,9 +327,10 @@ fn run_check() -> Result<(), Box<dyn std::error::Error>> {
322327
cargo clippy --all-targets -- -D warnings;
323328
cargo fmt --check;
324329
cargo sort --check;
325-
cargo clippy --all-targets --manifest-path=../builder/Cargo.toml -- -D warnings;
326-
cargo fmt --check --manifest-path=../builder/Cargo.toml;
327-
cargo sort --check --manifest-path=../builder/Cargo.toml;
330+
cd ../builder;
331+
cargo clippy --all-targets -- -D warnings;
332+
cargo fmt --check;
333+
cargo sort --check;
328334
)?;
329335
run_build()?;
330336
// Verify that compiling for release produces no errors.

0 commit comments

Comments
 (0)