feat: mirror can set none
This commit is contained in:
@@ -48,8 +48,8 @@ impl DockerCmd {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn mirror(&mut self, mirror: &str) -> &mut Self {
|
||||
self.mirror = Some(mirror.into());
|
||||
pub fn mirror(&mut self, mirror: &Option<&str>) -> &mut Self {
|
||||
self.mirror = mirror.map(|s| s.into());
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ fn main() {
|
||||
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 mirror.to_lowercase() != "none" {
|
||||
docker_cmd.mirror(mirror);
|
||||
docker_cmd.mirror(&Some(mirror));
|
||||
}
|
||||
}
|
||||
docker_cmd.exec(&args).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user