Allow tlmgr to run in Linux (fix #406)

This commit is contained in:
Roey Darwish Dror
2020-06-03 22:12:27 +03:00
committed by GitHub
parent 89578a7fd9
commit 98657edb60
5 changed files with 27 additions and 17 deletions

View File

@@ -60,6 +60,7 @@ pub struct Linux {
yay_arguments: Option<String>,
trizen_arguments: Option<String>,
dnf_arguments: Option<String>,
enable_tlmgr: Option<bool>,
}
#[derive(Deserialize, Default, Debug)]
@@ -439,6 +440,16 @@ impl Config {
.and_then(|linux| linux.dnf_arguments.as_deref())
}
/// Extra yay arguments
#[allow(dead_code)]
pub fn enable_tlmgr_linux(&self) -> bool {
self.config_file
.linux
.as_ref()
.and_then(|linux| linux.enable_tlmgr)
.unwrap_or(false)
}
pub fn use_predefined_git_repos(&self) -> bool {
!self.opt.disable_predefined_git_repos && self.config_file.predefined_git_repos.unwrap_or(true)
}