feat: mirror can set none
This commit is contained in:
@@ -48,8 +48,8 @@ impl DockerCmd {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mirror(&mut self, mirror: &str) -> &mut Self {
|
pub fn mirror(&mut self, mirror: &Option<&str>) -> &mut Self {
|
||||||
self.mirror = Some(mirror.into());
|
self.mirror = mirror.map(|s| s.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ fn main() {
|
|||||||
docker_cmd.add_volumn(&get_final_docker_registry(&docker_image), "/usr/local/cargo/registry");
|
docker_cmd.add_volumn(&get_final_docker_registry(&docker_image), "/usr/local/cargo/registry");
|
||||||
if let Some(mirror) = &crates_mirror.or(docker_build_config.mirror) {
|
if let Some(mirror) = &crates_mirror.or(docker_build_config.mirror) {
|
||||||
if mirror.to_lowercase() != "none" {
|
if mirror.to_lowercase() != "none" {
|
||||||
docker_cmd.mirror(mirror);
|
docker_cmd.mirror(&Some(mirror));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
docker_cmd.exec(&args).unwrap();
|
docker_cmd.exec(&args).unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user