pub(crate) fn exec_vault_read_cmd(vault_path: &str) -> Result<VaultReadOutput>Expand description
Executes the vault CLI to read a secret as JSON and deserialize it.
Runs vault read <vault_path> --format=json using std::process::Command and
deserializes the JSON standard output into a VaultReadOutput.
ยงErrors
- Launching or running the
vaultprocess fails (I/O error fromCommand). - The command standard output cannot be deserialized into
VaultReadOutputviaserde_json. - The standard output is not valid UTF-8 when constructing the contextual error message.