cli: cleaner error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user