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.
This commit is contained in:
Tobias Bieniek 2023-11-16 17:44:35 +01:00
parent 80326ca1f4
commit a91cae4192
No known key found for this signature in database

View file

@ -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()