Skip to content
Snippets Groups Projects
Commit f74cfbfc authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : missing cwd argument to run_command call

parent 2e82db45
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!116feat/release_pip
Pipeline #50961 failed
......@@ -50,16 +50,17 @@ def enqueue_output(stream, queue):
stream.close()
def run_command(command : list[str], cwd : pathlib.Path):
def run_command(command : list[str], cwd : pathlib.Path = None):
"""
This function has the job to run a command and return stdout and stderr that are not shown
by subprocess :
by subprocess.check_call / call.
If the subprocess returns smthg else than 0, it will raise an error.
Arg:
command : written with the same syntax as subprocess.call
cwd : path from where the command must be called
"""
process = subprocess.Popen(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
command, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
)
stdout_queue = queue.Queue()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment