fix: replace raise with sys.exit(1) in clone_repository for better error handling
This commit is contained in:
@@ -2,6 +2,7 @@ import re
|
|||||||
import secrets
|
import secrets
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@@ -330,7 +331,7 @@ def clone_repository(repo_url: str, run_name: str, dest_name: str | None = None)
|
|||||||
console.print("\n")
|
console.print("\n")
|
||||||
console.print(panel)
|
console.print(panel)
|
||||||
console.print()
|
console.print()
|
||||||
raise
|
sys.exit(1)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
error_text = Text()
|
error_text = Text()
|
||||||
error_text.append("❌ ", style="bold red")
|
error_text.append("❌ ", style="bold red")
|
||||||
@@ -349,7 +350,7 @@ def clone_repository(repo_url: str, run_name: str, dest_name: str | None = None)
|
|||||||
console.print("\n")
|
console.print("\n")
|
||||||
console.print(panel)
|
console.print(panel)
|
||||||
console.print()
|
console.print()
|
||||||
raise
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
# Docker utilities
|
# Docker utilities
|
||||||
|
|||||||
Reference in New Issue
Block a user