diff --git a/src/config.rs b/src/config.rs index 4272c9d0..c8e59f3f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -697,6 +697,22 @@ impl ConfigFile { } } + if let Some(paths) = result.git.as_mut().and_then(|git| git.pull_only_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; + } + } + + if let Some(paths) = result.git.as_mut().and_then(|git| git.push_only_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; + } + } + debug!("Loaded configuration: {:?}", result); Ok(result)