feat: enhance 1Password lookup module to handle empty output and improve logging
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
parent
97609e5578
commit
61f29fb7ba
@ -70,7 +70,13 @@ class LookupModule(LookupBase):
|
||||
text=True,
|
||||
check=True
|
||||
)
|
||||
return [result.stdout.strip()]
|
||||
output = result.stdout.strip()
|
||||
display.vvv(f"1Password output for ref '{ref}': '{output}'")
|
||||
|
||||
if not output:
|
||||
display.warning(f"1Password returned empty output for ref '{ref}'")
|
||||
|
||||
return [output]
|
||||
except subprocess.CalledProcessError as e:
|
||||
error_msg = e.stderr.strip()
|
||||
display.warning(f"Error executing 1Password CLI: {error_msg}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user