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.
This commit is contained in:
Jakub Beránek 2024-07-07 18:26:15 +02:00 committed by Jakub Beránek
parent 0cab9626f4
commit 1089de4339
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

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