Skip to content

Commit

Permalink
allow clean exit on password fail
Browse files Browse the repository at this point in the history
  • Loading branch information
cbusillo committed Jun 22, 2024
1 parent 667a581 commit faa40de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bd_to_avp/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import platform
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path

Expand Down Expand Up @@ -73,7 +74,11 @@ def install_deps() -> None:
sudo_env = os.environ.copy()

if config.app.is_gui:
pw_file_path, sudo_env = prompt_for_password()
try:
pw_file_path, sudo_env = prompt_for_password()
except subprocess.CalledProcessError as e:
on_error_string("Password prompt", "Failed to get password.")
sys.exit(1)

if not Path(config.HOMEBREW_PREFIX_BIN / "brew").exists():
install_brew(sudo_env)
Expand Down

0 comments on commit faa40de

Please sign in to comment.