diff --git a/crates/core/src/commands/common.rs b/crates/core/src/commands/common.rs index 89f5cc8..2ca65e8 100644 --- a/crates/core/src/commands/common.rs +++ b/crates/core/src/commands/common.rs @@ -59,7 +59,7 @@ pub async fn push(context: &Context<'_>, push: Push<'_>) -> Result<(), HiveLibEr context .node .target - .create_ssh_opts(context.modifiers, false)?, + .create_ssh_opts(context.modifiers)?, )]), ) .await?; diff --git a/crates/core/src/commands/noninteractive.rs b/crates/core/src/commands/noninteractive.rs index 399f5d9..b1d6a7e 100644 --- a/crates/core/src/commands/noninteractive.rs +++ b/crates/core/src/commands/noninteractive.rs @@ -192,7 +192,7 @@ fn create_sync_ssh_command( modifiers: SubCommandModifiers, ) -> Result { let mut command = Command::new("ssh"); - command.args(target.create_ssh_args(modifiers, true, false)?); + command.args(target.create_ssh_args(modifiers, true)?); command.arg(target.get_preferred_host()?.to_string()); Ok(command) diff --git a/crates/core/src/commands/pty/mod.rs b/crates/core/src/commands/pty/mod.rs index b914e90..e2e1879 100644 --- a/crates/core/src/commands/pty/mod.rs +++ b/crates/core/src/commands/pty/mod.rs @@ -433,7 +433,7 @@ fn create_int_ssh_command( modifiers: SubCommandModifiers, ) -> Result { let mut command = portable_pty::CommandBuilder::new("ssh"); - command.args(target.create_ssh_args(modifiers, false, false)?); + command.args(target.create_ssh_args(modifiers, false)?); command.arg(target.get_preferred_host()?.to_string()); Ok(command) } diff --git a/crates/core/src/hive/node.rs b/crates/core/src/hive/node.rs index 63d9c9a..80f4812 100644 --- a/crates/core/src/hive/node.rs +++ b/crates/core/src/hive/node.rs @@ -49,9 +49,8 @@ impl Target { pub fn create_ssh_opts( &self, modifiers: SubCommandModifiers, - master: bool, ) -> Result { - self.create_ssh_args(modifiers, false, master) + self.create_ssh_args(modifiers, false) .map(|x| x.join(" ")) } @@ -60,7 +59,6 @@ impl Target { &self, modifiers: SubCommandModifiers, non_interactive_forced: bool, - master: bool, ) -> Result, HiveLibError> { let mut vector = vec![ "-l".to_string(), @@ -220,7 +218,7 @@ impl Node { let mut command_string = CommandStringBuilder::new("ssh"); command_string.arg(format!("{}@{host}", self.target.user)); - command_string.arg(self.target.create_ssh_opts(modifiers, true)?); + command_string.arg(self.target.create_ssh_opts(modifiers)?); command_string.arg("exit"); let output = run_command( @@ -858,18 +856,18 @@ mod tests { assert_eq!( target - .create_ssh_args(subcommand_modifiers, false, false) + .create_ssh_args(subcommand_modifiers, false) .unwrap(), args ); assert_eq!( - target.create_ssh_opts(subcommand_modifiers, false).unwrap(), + target.create_ssh_opts(subcommand_modifiers).unwrap(), args.join(" ") ); assert_eq!( target - .create_ssh_args(subcommand_modifiers, false, true) + .create_ssh_args(subcommand_modifiers, false) .unwrap(), [ "-l".to_string(), @@ -887,7 +885,7 @@ mod tests { assert_eq!( target - .create_ssh_args(subcommand_modifiers, true, true) + .create_ssh_args(subcommand_modifiers, true) .unwrap(), [ "-l".to_string(), @@ -906,7 +904,7 @@ mod tests { // forced non interactive is the same as --non-interactive assert_eq!( target - .create_ssh_args(subcommand_modifiers, true, false) + .create_ssh_args(subcommand_modifiers, true) .unwrap(), target .create_ssh_args( @@ -914,7 +912,6 @@ mod tests { non_interactive: true, ..Default::default() }, - false, false ) .unwrap()