@@ -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