From 705e36217c8bea872aabeb0bcb64c81c464c80a9 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 11 Jun 2020 15:19:18 +0300 Subject: [PATCH] Fix git repos (fix #425) (#427) --- src/config.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 19bd36d1..69d374a9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -193,7 +193,17 @@ impl ConfigFile { if let Some(ref mut paths) = &mut result.git_repos { for path in paths.iter_mut() { - *path = shellexpand::tilde::<&str>(&path.as_ref()).into_owned(); + let expanded = shellexpand::tilde::<&str>(&path.as_ref()).into_owned(); + debug!("Path {} expanded to {}", path, expanded); + *path = expanded; + } + } + + if let Some(paths) = result.git.as_mut().and_then(|git| git.repos.as_mut()) { + for path in paths.iter_mut() { + let expanded = shellexpand::tilde::<&str>(&path.as_ref()).into_owned(); + debug!("Path {} expanded to {}", path, expanded); + *path = expanded; } }