fix(git): fix shellexpand::tilde in git_repos in topgrade.d/* (#1223)
This commit is contained in:
@@ -398,14 +398,6 @@ _version: 2
|
||||
zh_CN: "Topgrade %{version_str} 破坏性更改"
|
||||
zh_TW: "Topgrade %{version_str} 重大更改"
|
||||
de: "Topgrade %{version_str} Inkompatible Änderungen"
|
||||
"Path {path} expanded to {expanded}":
|
||||
en: "Path %{path} expanded to %{expanded}"
|
||||
lt: "Kelias %{path} išplėstas į %{expanded}"
|
||||
es: "Ruta %{path} expandida a %{expanded}"
|
||||
fr: "Le chemin %{path} a été transformé en %{expanded}"
|
||||
zh_CN: "已扩展 %{path} 至 %{expanded}"
|
||||
zh_TW: "已擴展 %{path} 至 %{expanded}"
|
||||
de: "Pfad %{path} erweitert zu %{expanded}"
|
||||
"Path {path} doesn't exist":
|
||||
en: "Path %{path} doesn't exist"
|
||||
lt: "Kelias %{path} neegzistuoja"
|
||||
|
||||
@@ -15,7 +15,6 @@ use indexmap::IndexMap;
|
||||
use merge::Merge;
|
||||
use regex::Regex;
|
||||
use regex_split::RegexSplit;
|
||||
use rust_i18n::t;
|
||||
use serde::Deserialize;
|
||||
use strum::IntoEnumIterator;
|
||||
use tracing::{debug, error};
|
||||
@@ -659,17 +658,6 @@ impl ConfigFile {
|
||||
}
|
||||
}
|
||||
|
||||
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!(
|
||||
"{}",
|
||||
t!("Path {path} expanded to {expanded}", path = path, expanded = expanded)
|
||||
);
|
||||
*path = expanded;
|
||||
}
|
||||
}
|
||||
|
||||
debug!("Loaded configuration: {:?}", result);
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ pub fn run_git_pull(ctx: &ExecutionContext) -> Result<()> {
|
||||
// Handle user-defined repos
|
||||
if let Some(custom_git_repos) = config.git_repos() {
|
||||
for git_repo in custom_git_repos {
|
||||
repos.glob_insert(git_repo);
|
||||
repos.glob_insert(&shellexpand::tilde(git_repo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user