cli: cleaner error handling
Deploy bin / deploy (push) Successful in 2s
Deploy, build and restart MASTER / deploy (push) Successful in 2s
Deploy agebd python package / deploy (push) Successful in 2s

This commit is contained in:
Benjamin Labrecque
2026-07-07 12:08:06 +02:00
parent 72655335a6
commit a96c7fc77d
+3 -3
View File
@@ -109,13 +109,13 @@ class ServiceCreator:
"""
Generates a uv.lock file by running 'uv lock' in the target directory.
"""
project_path = Path(SERVICE_DEST_DIR / service.dir_name).resolve()
logger.info(f"Generating uv.lock inside: {project_path}")
app_path = Path(SERVICE_DEST_DIR / service.dir_name / "current" / "app").resolve()
logger.info(f"Generating uv.lock inside: {app_path}")
try:
result = subprocess.run(
["uv", "lock"],
cwd=project_path, # Changes the working directory for the command
cwd=app_path, # Changes the working directory for the command
capture_output=True, # Captures stdout and stderr
text=True, # Returns strings instead of raw bytes
check=True, # Raises CalledProcessError if the exit code is non-zero