diff --git a/src/main.rs b/src/main.rs index be14a6b3..ad28de2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,6 +85,11 @@ fn run() -> Result<(), Error> { .help("Don't perform system upgrade") .long("no-system"), ) + .arg( + Arg::with_name("no_git_repos") + .help("Don't perform updates on configured git repos") + .long("no-git-repos"), + ) .arg( Arg::with_name("dry_run") .help("Print what would be done") @@ -166,12 +171,13 @@ fn run() -> Result<(), Error> { } } - if let Some(custom_git_repos) = config.git_repos() { - for git_repo in custom_git_repos { - git_repos.insert(git_repo); + if !(matches.is_present("no_git_repos")) { + if let Some(custom_git_repos) = config.git_repos() { + for git_repo in custom_git_repos { + git_repos.insert(git_repo); + } } } - for repo in git_repos.repositories() { report.push_result(execute(|terminal| git.pull(&repo, terminal, dry_run), &mut terminal)); }