From 78ebee9ce239eb4f39e3df1fa460de932e83fd90 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Mon, 30 Mar 2020 10:37:23 +0300 Subject: [PATCH 1/3] Fix oh-my-zsh --- src/steps/zsh.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/steps/zsh.rs b/src/steps/zsh.rs index ded07b98..84097ff3 100644 --- a/src/steps/zsh.rs +++ b/src/steps/zsh.rs @@ -98,17 +98,18 @@ pub fn run_oh_my_zsh(ctx: &ExecutionContext) -> Result<()> { debug!("oh-my-zsh custom dir: {}", custom_dir.display()); - let mut custom_plugins = Repositories::new(ctx.git()); - for entry in fs::read_dir(custom_dir)? { - let entry = entry?; - custom_plugins.insert_if_repo(entry.path()); - } + if let Ok(custom_plugins_dir) = fs::read_dir(custom_dir) { + let mut custom_plugins = Repositories::new(ctx.git()); - custom_plugins.remove(&oh_my_zsh.to_string_lossy()); - - if !custom_plugins.is_empty() { - println!("Pulling custom plugins"); - ctx.git().multi_pull(&custom_plugins, ctx)?; + for entry in custom_plugins_dir? { + let entry = entry?; + custom_plugins.insert_if_repo(entry.path()); + } + custom_plugins.remove(&oh_my_zsh.to_string_lossy()); + if !custom_plugins.is_empty() { + println!("Pulling custom plugins"); + ctx.git().multi_pull(&custom_plugins, ctx)?; + } } ctx.run_type() From 8dc2022cf8f1318bad3cdfb7bec366f2a94ff6b6 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Mon, 30 Mar 2020 10:42:12 +0300 Subject: [PATCH 2/3] fix --- src/steps/zsh.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/zsh.rs b/src/steps/zsh.rs index 84097ff3..ca92caa1 100644 --- a/src/steps/zsh.rs +++ b/src/steps/zsh.rs @@ -101,7 +101,7 @@ pub fn run_oh_my_zsh(ctx: &ExecutionContext) -> Result<()> { if let Ok(custom_plugins_dir) = fs::read_dir(custom_dir) { let mut custom_plugins = Repositories::new(ctx.git()); - for entry in custom_plugins_dir? { + for entry in custom_plugins_dir { let entry = entry?; custom_plugins.insert_if_repo(entry.path()); } From 40763a4022ce2b150528f7041abe3ce7fca99b97 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Mon, 30 Mar 2020 10:55:41 +0300 Subject: [PATCH 3/3] Version bump --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09cbcf94..d154f97f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1902,7 +1902,7 @@ dependencies = [ [[package]] name = "topgrade" -version = "4.3.0" +version = "4.3.1" dependencies = [ "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 7e7e2564..eeff93d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ categories = ["os"] keywords = ["upgrade", "update"] license-file = "LICENSE" repository = "https://github.com/r-darwish/topgrade" -version = "4.3.0" +version = "4.3.1" authors = ["Roey Darwish Dror "] exclude = ["doc/screenshot.gif"] edition = "2018"