Skip to content

Commit 7298ad2

Browse files
committed
decrypt: soften get_private_key error context for non-missing failures
The previous message implied no key was configured whenever get_private_key failed; invalid A8C_SECRETS_IDENTITY or a bad key file could mislead users. Use neutral wording (failed to obtain) and conditional guidance (if you haven't configured one yet). Made-with: Cursor
1 parent 45c1c5b commit 7298ad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/decrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn run(crypto_engine: &dyn CryptoEngine, args: &DecryptArgs) -> Result<()> {
4646

4747
let private_key = keys::get_private_key(&repo_identifier).with_context(|| {
4848
format!(
49-
"No private key for '{repo_identifier}'. Run `a8c-secrets keys import` with the dev key from Secret Store, or set A8C_SECRETS_IDENTITY (for example in CI)."
49+
"Failed to obtain private key for '{repo_identifier}'. If you haven't configured one yet, run `a8c-secrets keys import` with the dev key from Secret Store, or set A8C_SECRETS_IDENTITY (for example in CI)."
5050
)
5151
})?;
5252

0 commit comments

Comments
 (0)