From 7423e450495ecc7d32ee359ee64fa991e516b5a1 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sat, 15 Oct 2022 01:57:20 -0700 Subject: [PATCH] Use --offline when building docs This reflects the intent of the command, since containers are isolated from the network. And it provides a clearer error message in case there is some problem and cargo would try to make a network request. --- src/docbuilder/rustwide_builder.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index 97d653909..cfb35421e 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -673,6 +673,7 @@ impl RustwideBuilder { // Add docs.rs specific arguments let mut cargo_args = vec![ + "--offline".into(), // We know that `metadata` unconditionally passes `-Z rustdoc-map`. // Don't copy paste this, since that fact is not stable and may change in the future. "-Zunstable-options".into(),