mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
_create_project_source_dist: run subprocess as shell (#3390)
This commit is contained in:
@@ -188,12 +188,12 @@ class EventStreamRuntime(Runtime):
|
||||
|
||||
@tenacity.retry(
|
||||
stop=tenacity.stop_after_attempt(10),
|
||||
wait=tenacity.wait_exponential(multiplier=2, min=4, max=60),
|
||||
wait=tenacity.wait_exponential(multiplier=2, min=10, max=60),
|
||||
)
|
||||
async def _wait_until_alive(self):
|
||||
logger.info('Reconnecting session')
|
||||
container = self.docker_client.containers.get(self.container_name)
|
||||
# print logs
|
||||
# get logs
|
||||
_logs = container.logs(tail=10).decode('utf-8').split('\n')
|
||||
# add indent
|
||||
_logs = '\n'.join([f' |{log}' for log in _logs])
|
||||
|
||||
@@ -40,7 +40,7 @@ def _create_project_source_dist():
|
||||
logger.info(f'Using project root: {project_root}')
|
||||
|
||||
# run "python -m build -s" on project_root to create project tarball
|
||||
result = subprocess.run(['python', '-m', 'build', '-s', project_root])
|
||||
result = subprocess.run(f'python -m build -s {project_root}', shell=True)
|
||||
if result.returncode != 0:
|
||||
logger.error(f'Build failed: {result}')
|
||||
raise Exception(f'Build failed: {result}')
|
||||
|
||||
Reference in New Issue
Block a user