From 90a44e8b6e27d732238f98c914acd117c7eae890 Mon Sep 17 00:00:00 2001 From: brb Date: Thu, 6 Jul 2023 17:32:41 +0200 Subject: [PATCH] updated running method --- code/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/app.py b/code/app.py index f319d49..c8eba92 100644 --- a/code/app.py +++ b/code/app.py @@ -5,6 +5,7 @@ from dotenv import load_dotenv import logging from typing import List import os +from subprocess import run from utils import clone_repository, load_runner_script from setup_logging import setup_logging @@ -80,7 +81,7 @@ def handle_event(request: GiteaRequest): os.system(f'pip install -r {requirements_path}') for cmd in pipeline.script: try: - os.system(cmd) + run(cmd) except Exception as e: raise HTTPException( status_code=503,