Skip to content

Commit

Permalink
Add URL to login prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Encephala committed Jan 14, 2024
1 parent 5472911 commit 151f502
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vault_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def run_command(command, **kwargs):
status = json.loads(run_command("bw status", stdout = PIPE).stdout)["status"]

if status == BW_RESP_UNATH:
server_url = run_command("bw config server", stdout = PIPE).stdout.decode()

# Write to stderr because Ansible expects
# only the password to be written to stdout
print("Log in to Bitwarden:", file = sys.stderr)
print(f"Log in to Bitwarden: ({server_url})", file = sys.stderr)

# We lose pretty formatting with stdout = PIPE,
# but it's the only way to capture stdout
Expand Down

0 comments on commit 151f502

Please sign in to comment.