From ddf42d723837cb8545aced7980f892947408e234 Mon Sep 17 00:00:00 2001 From: Anillc Date: Sun, 9 Jun 2024 03:23:01 +0800 Subject: allow --ssh-opts that starts with hyphen --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 47dc936..88fc7e5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -68,7 +68,7 @@ pub struct Opts { #[clap(long)] profile_user: Option, /// Override the SSH options used - #[clap(long)] + #[clap(long, allow_hyphen_values = true)] ssh_opts: Option, /// Override if the connecting to the target node should be considered fast #[clap(long)] -- cgit v1.2.3 From 20261c6428220b0a849e9745d682711144907b49 Mon Sep 17 00:00:00 2001 From: Anillc Date: Mon, 10 Jun 2024 19:34:56 +0800 Subject: add test for allow_hyphen_values of --ssh-opts --- nix/tests/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/tests/default.nix b/nix/tests/default.nix index b38e99d..7fe8628 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -131,4 +131,9 @@ in { user = "deploy"; deployArgs = "-s .#profile -- --offline"; }; + hyphen-ssh-opts-regression = mkTest { + name = "profile"; + user = "deploy"; + deployArgs = "-s .#profile --ssh-opts '-p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' -- --offline"; + }; } -- cgit v1.2.3