Parcourir la source

Fix spaces in path (#3547)

* Fix for issue where spaces in path results in error
tofarr il y a 1 an
Parent
commit
8d47cebde9
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      openhands/runtime/utils/runtime_build.py

+ 3 - 1
openhands/runtime/utils/runtime_build.py

@@ -41,7 +41,9 @@ 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(f'python -m build -s {project_root}', shell=True)
+    result = subprocess.run(
+        f'python -m build -s ' + project_root.replace(" ", r"\ "), shell=True
+    )
     if result.returncode != 0:
         logger.error(f'Build failed: {result}')
         raise Exception(f'Build failed: {result}')