We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72e44c4 commit f4bc494Copy full SHA for f4bc494
src/cargo-fmt/main.rs
@@ -519,9 +519,16 @@ fn get_cargo_metadata(
519
if let Some(manifest_path) = manifest_path {
520
cmd.manifest_path(manifest_path);
521
}
522
+
523
match cmd.exec() {
524
Ok(metadata) => Ok(metadata),
- Err(error) => Err(io::Error::new(io::ErrorKind::Other, error.to_string())),
525
+ Err(_) => {
526
+ cmd.other_options(&[String::from("--offline")]);
527
+ match cmd.exec() {
528
+ Ok(metadata) => Ok(metadata),
529
+ Err(error) => Err(io::Error::new(io::ErrorKind::Other, error.to_string())),
530
+ }
531
532
533
534
0 commit comments