Skip to content

Commit 06e6acd

Browse files
committed
feat: allow explicitly empty mirror URLs
1 parent 74ff55d commit 06e6acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/patchable/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct ProductConfig {
3939
///
4040
/// This value is _not_ used by `checkout`, that uses [`ProductVersionConfig::mirror`] instead.
4141
/// `init --mirror` copies this value into [`ProductVersionConfig::mirror`].
42-
#[serde(skip_serializing_if = "Option::is_none")]
4342
default_mirror: Option<String>,
4443
}
4544

@@ -583,6 +582,7 @@ fn main() -> Result<()> {
583582
let mirror_url = if mirror {
584583
let mut mirror_url = config
585584
.default_mirror
585+
.filter(|s| !s.is_empty())
586586
.context(InitMirrorNotConfiguredSnafu)?;
587587
if ssh {
588588
mirror_url =

0 commit comments

Comments
 (0)