Add a flag to disable the predefined git repositories (fix #305)
This commit is contained in:
@@ -57,6 +57,7 @@ pub struct ConfigFile {
|
||||
pre_commands: Option<Commands>,
|
||||
commands: Option<Commands>,
|
||||
git_repos: Option<Vec<String>>,
|
||||
predefined_git_repos: Option<bool>,
|
||||
disable: Option<Vec<Step>>,
|
||||
remote_topgrades: Option<Vec<String>>,
|
||||
ssh_arguments: Option<String>,
|
||||
@@ -189,6 +190,10 @@ pub struct CommandLineArgs {
|
||||
/// Say yes to package manager's prompt (experimental)
|
||||
#[structopt(short = "y", long = "yes")]
|
||||
yes: bool,
|
||||
|
||||
/// Disable predefined_git_repos
|
||||
#[structopt(long = "disable-predefined-git-repos")]
|
||||
disable_predefined_git_repos: bool,
|
||||
}
|
||||
|
||||
impl CommandLineArgs {
|
||||
@@ -349,4 +354,8 @@ impl Config {
|
||||
None => "--devel",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn use_predefined_git_repos(&self) -> bool {
|
||||
!self.opt.disable_predefined_git_repos && self.config_file.predefined_git_repos.unwrap_or(true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user