From 6d3b19d705df40429cba06fd91cdf945f65daa82 Mon Sep 17 00:00:00 2001 From: Michael Liu <34015028+ljxw88@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:38:10 +0000 Subject: [PATCH] Update cli/utils.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- cli/utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cli/utils.py b/cli/utils.py index 56c7aa6a..175022e3 100644 --- a/cli/utils.py +++ b/cli/utils.py @@ -374,9 +374,13 @@ def perform_copilot_oauth() -> bool: console.print("[red]GitHub authentication skipped. Exiting...[/red]") return False - result = subprocess.run(["gh", "auth", "login"]) - if result.returncode != 0: - console.print("[red]`gh auth login` failed.[/red]") + try: + result = subprocess.run(["gh", "auth", "login"]) + if result.returncode != 0: + console.print("[red]`gh auth login` failed.[/red]") + return False + except FileNotFoundError: + console.print("[red]Error: `gh` command not found. Please install the GitHub CLI.[/red]") return False if check_copilot_auth():