Self rename in Windows (fix #458) (#460)

This commit is contained in:
Roey Darwish Dror
2020-07-01 21:03:19 +03:00
committed by GitHub
parent 9c9c92796b
commit 3f80bee53a
4 changed files with 71 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ pub struct Vagrant {
#[serde(deny_unknown_fields)]
pub struct Windows {
accept_all_updates: Option<bool>,
self_rename: Option<bool>,
}
#[derive(Deserialize, Default, Debug)]
@@ -505,6 +506,16 @@ impl Config {
.unwrap_or(true)
}
/// Whether to self rename the Topgrade executable during the run
#[allow(dead_code)]
pub fn self_rename(&self) -> bool {
self.config_file
.windows
.as_ref()
.and_then(|w| w.self_rename)
.unwrap_or(false)
}
/// Whether Brew cask should be greedy
#[allow(dead_code)]
pub fn brew_cask_greedy(&self) -> bool {