From c1c37d1624946322c87cb39a31ea51de77269bd9 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Tue, 29 Aug 2023 03:23:10 +0000 Subject: [PATCH] fix: keystore path tilde expansion --- src/signer.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/signer.rs b/src/signer.rs index ccf0621..a7a106b 100644 --- a/src/signer.rs +++ b/src/signer.rs @@ -103,7 +103,11 @@ impl SignerArgs { } fn resolve_keystore(keystore: String, keystore_password: Option) -> Result { - let keystore = PathBuf::from(&keystore); + if keystore.is_empty() { + anyhow::bail!("empty keystore path"); + } + + let keystore = PathBuf::from(shellexpand::tilde(&keystore).into_owned()); if keystore_password.is_some() { eprintln!(