Skip to content

Commit

Permalink
cargo-credential-1password: Add missing --account argument to `op s…
Browse files Browse the repository at this point in the history
…ignin` 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.
  • Loading branch information
Turbo87 committed Nov 16, 2023
1 parent 80326ca commit a91cae4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions credential/cargo-credential-1password/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a91cae4

Please sign in to comment.