Fixed clone diff issue

main
Michal 2 years ago
parent 62f9ad527e
commit c2b963556b
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -15,13 +15,15 @@ pub fn clone(verbose: bool) {
.map(|x| x.unwrap().path().display().to_string())
.collect::<Vec<String>>();
dirs.retain(|x| *x != "./mlc.toml");
dirs.retain(|x| *x != "./out");
dirs.retain(|x| *x != format!("./{}", config.mode.repository.name));
log!(verbose, "Paths with mlc.toml excluded: {:?}", dirs);
// Creates a vector of the difference between cloned repos and repos defined in config
let mut repo_diff = vec![];
for repo in repos {
let name = &repo.name;
if !dirs.contains(name) {
if !dirs.contains(&format!("./{}", name)) {
repo_diff.push(repo);
}
}

Loading…
Cancel
Save