Rename sq key password's --clear argument to --clear-password.
- This makes the argument's intent clearer and more closely mirrors the other arguments, like `--new-password-file`.
This commit is contained in:
parent
02cd47c6e3
commit
2ed7435b63
1
NEWS
1
NEWS
@ -68,6 +68,7 @@
|
||||
- `sq key attest-certifications` can now use the cert store and the
|
||||
key store.
|
||||
- Rename the `--expiry` argument to `--expiration`.
|
||||
- Rename `sq key password`'s `--clear` argument to `--clear-password`.
|
||||
* Changes in 0.36.0
|
||||
- Missing
|
||||
* Changes in 0.35.0
|
||||
|
@ -548,7 +548,7 @@ Clear the password protection.",
|
||||
command: &[
|
||||
"sq", "key", "password",
|
||||
"--old-password-file", "password-file.txt",
|
||||
"--clear",
|
||||
"--clear-password",
|
||||
"--cert", "EB28F26E2739A4870ECC47726F0073F60FD0CBF0"
|
||||
],
|
||||
}),
|
||||
@ -623,7 +623,7 @@ any surrounding whitespace like a trailing newline."
|
||||
long,
|
||||
help = "Clear the password protecting the secret key material",
|
||||
)]
|
||||
pub clear: bool,
|
||||
pub clear_password: bool,
|
||||
|
||||
#[clap(
|
||||
help = FileOrStdout::HELP_OPTIONAL,
|
||||
|
@ -25,7 +25,7 @@ pub fn password(
|
||||
// None => clear password
|
||||
let mut get_new_password = || -> Result<Option<Password>> {
|
||||
if new_password_.is_none() {
|
||||
new_password_ = if command.clear {
|
||||
new_password_ = if command.clear_password {
|
||||
Some(None)
|
||||
} else if let Some(path) = command.new_password_file.as_ref() {
|
||||
Some(Some(std::fs::read(path)?.into()))
|
||||
|
@ -100,7 +100,7 @@ fn sq_key_password() -> Result<()> {
|
||||
cmd.args([
|
||||
"key", "password",
|
||||
"--old-password-file", &new_password.to_string_lossy(),
|
||||
"--clear",
|
||||
"--clear-password",
|
||||
]);
|
||||
if keystore {
|
||||
cmd.args([
|
||||
|
Loading…
Reference in New Issue
Block a user