Add an ssh_arguments configuration file field (#211)

Can be used to add SSH command-line arguments like `-o
ConnectTimeout=2`
This commit is contained in:
Fred Morcos
2019-09-01 20:45:44 +02:00
committed by Roey Darwish Dror
parent 6dac7a18b2
commit bfbb486fba
3 changed files with 30 additions and 12 deletions

View File

@@ -87,6 +87,7 @@ pub struct ConfigFile {
git_repos: Option<Vec<String>>,
disable: Option<Vec<Step>>,
remote_topgrades: Option<Vec<String>>,
ssh_arguments: Option<String>,
}
impl ConfigFile {
@@ -270,6 +271,11 @@ impl Config {
&self.config_file.remote_topgrades
}
/// Extra SSH arguments
pub fn ssh_arguments(&self) -> &Option<String> {
&self.config_file.ssh_arguments
}
/// Prompt for a key before exiting
pub fn keep_at_end(&self) -> bool {
self.opt.keep_at_end || env::var("TOPGRADE_KEEP_END").is_ok()