From a91cae4192d7f1d7e8af661f8b31e86f6978abdc Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 16 Nov 2023 17:44:35 +0100 Subject: [PATCH] cargo-credential-1password: Add missing `--account` argument to `op signin` command Without this the account chooser is shown by the `op signin` command, even though the user has already specified an account via the `--account` command line argument to the `cargo-credential-1password` CLI. Note that the `--vault` in this case does not need to be forwarded to `op`, since it is irrelevant for the `op signin` command. --- credential/cargo-credential-1password/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/credential/cargo-credential-1password/src/main.rs b/credential/cargo-credential-1password/src/main.rs index 921b521456a..321a99c5168 100644 --- a/credential/cargo-credential-1password/src/main.rs +++ b/credential/cargo-credential-1password/src/main.rs @@ -79,6 +79,10 @@ impl OnePasswordKeychain { } let mut cmd = Command::new("op"); cmd.args(["signin", "--raw"]); + if let Some(account) = &self.account { + cmd.arg("--account"); + cmd.arg(account); + } cmd.stdout(Stdio::piped()); let mut child = cmd .spawn()