From 626a8c71de31c9519f9f3e0e60bc2cc1dfe87208 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sat, 22 Feb 2025 02:41:38 -0800 Subject: [PATCH] fix skyvern init cli (#1813) --- skyvern/cli/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skyvern/cli/commands.py b/skyvern/cli/commands.py index e3684ea2..bfd5092f 100644 --- a/skyvern/cli/commands.py +++ b/skyvern/cli/commands.py @@ -24,14 +24,15 @@ def run_command(command: str, check: bool = True) -> tuple[Optional[str], Option def is_postgres_running() -> bool: if command_exists("pg_isready"): - result = run_command("pg_isready") + result, _ = run_command("pg_isready") return result is not None and "accepting connections" in result return False def database_exists(dbname: str, user: str) -> bool: check_db_command = f'psql {dbname} -U {user} -c "\\q"' - return run_command(check_db_command, check=False) is not None + output, _ = run_command(check_db_command, check=False) + return output is not None def create_database_and_user() -> None: