Skip to content

Commit a91cae4

Browse files
committed
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.
1 parent 80326ca commit a91cae4

File tree

1 file changed

+4
-0
lines changed
  • credential/cargo-credential-1password/src

1 file changed

+4
-0
lines changed

credential/cargo-credential-1password/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ impl OnePasswordKeychain {
7979
}
8080
let mut cmd = Command::new("op");
8181
cmd.args(["signin", "--raw"]);
82+
if let Some(account) = &self.account {
83+
cmd.arg("--account");
84+
cmd.arg(account);
85+
}
8286
cmd.stdout(Stdio::piped());
8387
let mut child = cmd
8488
.spawn()

0 commit comments

Comments
 (0)