From 1089de43394aace6ea7e88bd2bb3b7546a7883fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sun, 7 Jul 2024 18:26:15 +0200 Subject: [PATCH] Simplify command executions for plain source tarballs If we're in dry run mode, the command will return an empty string, so we can just execute it. --- src/bootstrap/src/core/build_steps/dist.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 7bc5405e92f9..aebec60112fb 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1060,11 +1060,7 @@ impl Step for PlainSourceTarball { cmd.arg("--sync").arg(manifest_path); } - let config = if !builder.config.dry_run() { - cmd.capture().run(builder).stdout() - } else { - String::new() - }; + let config = cmd.capture().run(builder).stdout(); let cargo_config_dir = plain_dst_src.join(".cargo"); builder.create_dir(&cargo_config_dir);