Skip to content

Commit 3ffb42e

Browse files
committed
remove unused 3rd argument for ssh opts
1 parent 2a8f51d commit 3ffb42e

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

crates/core/src/commands/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub async fn push(context: &Context<'_>, push: Push<'_>) -> Result<(), HiveLibEr
5959
context
6060
.node
6161
.target
62-
.create_ssh_opts(context.modifiers, false)?,
62+
.create_ssh_opts(context.modifiers)?,
6363
)]),
6464
)
6565
.await?;

crates/core/src/commands/noninteractive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fn create_sync_ssh_command(
192192
modifiers: SubCommandModifiers,
193193
) -> Result<Command, HiveLibError> {
194194
let mut command = Command::new("ssh");
195-
command.args(target.create_ssh_args(modifiers, true, false)?);
195+
command.args(target.create_ssh_args(modifiers, true)?);
196196
command.arg(target.get_preferred_host()?.to_string());
197197

198198
Ok(command)

crates/core/src/commands/pty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ fn create_int_ssh_command(
433433
modifiers: SubCommandModifiers,
434434
) -> Result<portable_pty::CommandBuilder, HiveLibError> {
435435
let mut command = portable_pty::CommandBuilder::new("ssh");
436-
command.args(target.create_ssh_args(modifiers, false, false)?);
436+
command.args(target.create_ssh_args(modifiers, false)?);
437437
command.arg(target.get_preferred_host()?.to_string());
438438
Ok(command)
439439
}

crates/core/src/hive/node.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ impl Target {
4949
pub fn create_ssh_opts(
5050
&self,
5151
modifiers: SubCommandModifiers,
52-
master: bool,
5352
) -> Result<String, HiveLibError> {
54-
self.create_ssh_args(modifiers, false, master)
53+
self.create_ssh_args(modifiers, false)
5554
.map(|x| x.join(" "))
5655
}
5756

@@ -60,7 +59,6 @@ impl Target {
6059
&self,
6160
modifiers: SubCommandModifiers,
6261
non_interactive_forced: bool,
63-
master: bool,
6462
) -> Result<Vec<String>, HiveLibError> {
6563
let mut vector = vec![
6664
"-l".to_string(),
@@ -220,7 +218,7 @@ impl Node {
220218

221219
let mut command_string = CommandStringBuilder::new("ssh");
222220
command_string.arg(format!("{}@{host}", self.target.user));
223-
command_string.arg(self.target.create_ssh_opts(modifiers, true)?);
221+
command_string.arg(self.target.create_ssh_opts(modifiers)?);
224222
command_string.arg("exit");
225223

226224
let output = run_command(
@@ -858,18 +856,18 @@ mod tests {
858856

859857
assert_eq!(
860858
target
861-
.create_ssh_args(subcommand_modifiers, false, false)
859+
.create_ssh_args(subcommand_modifiers, false)
862860
.unwrap(),
863861
args
864862
);
865863
assert_eq!(
866-
target.create_ssh_opts(subcommand_modifiers, false).unwrap(),
864+
target.create_ssh_opts(subcommand_modifiers).unwrap(),
867865
args.join(" ")
868866
);
869867

870868
assert_eq!(
871869
target
872-
.create_ssh_args(subcommand_modifiers, false, true)
870+
.create_ssh_args(subcommand_modifiers, false)
873871
.unwrap(),
874872
[
875873
"-l".to_string(),
@@ -887,7 +885,7 @@ mod tests {
887885

888886
assert_eq!(
889887
target
890-
.create_ssh_args(subcommand_modifiers, true, true)
888+
.create_ssh_args(subcommand_modifiers, true)
891889
.unwrap(),
892890
[
893891
"-l".to_string(),
@@ -906,15 +904,14 @@ mod tests {
906904
// forced non interactive is the same as --non-interactive
907905
assert_eq!(
908906
target
909-
.create_ssh_args(subcommand_modifiers, true, false)
907+
.create_ssh_args(subcommand_modifiers, true)
910908
.unwrap(),
911909
target
912910
.create_ssh_args(
913911
SubCommandModifiers {
914912
non_interactive: true,
915913
..Default::default()
916914
},
917-
false,
918915
false
919916
)
920917
.unwrap()

0 commit comments

Comments
 (0)