Allow remotes to be launched in new Windows terminal windows (#504)

This commit is contained in:
Roey Darwish Dror
2020-08-23 09:12:40 +03:00
committed by GitHub
parent 201910ed28
commit 34c74e44ca
2 changed files with 33 additions and 21 deletions

View File

@@ -132,7 +132,7 @@ pub struct Vagrant {
pub struct Windows {
accept_all_updates: Option<bool>,
self_rename: Option<bool>,
use_gsudo_with_choco: Option<bool>,
open_remotes_in_new_terminal: Option<bool>,
}
#[derive(Deserialize, Default, Debug)]
@@ -396,15 +396,6 @@ impl Config {
check_deprecated!(config_file, yay_arguments, linux, yay_arguments);
check_deprecated!(config_file, accept_all_windows_updates, windows, accept_all_updates);
if config_file
.windows
.as_ref()
.map(|w| w.use_gsudo_with_choco.is_some())
.unwrap_or(false)
{
println!("use_gsudo_with_choco is deprecated and will be removed in the future. Topgrade will not automatically detect and use gsudo");
}
let allowed_steps = Self::allowed_steps(&opt, &config_file);
Ok(Self {
@@ -657,6 +648,14 @@ impl Config {
self.opt.show_skipped
}
pub fn open_remotes_in_new_terminal(&self) -> bool {
self.config_file
.windows
.as_ref()
.and_then(|windows| windows.open_remotes_in_new_terminal)
.unwrap_or(false)
}
#[cfg(target_os = "linux")]
str_value!(linux, emerge_sync_flags);