π OpenHands: AI-Driven Development
fix warning for workspace_base (#8667)
Robert Brennan35426a04d829
diff --git a/openhands/core/config/utils.py b/openhands/core/config/utils.pyindex b86784b3d0..49d317f6c0 100644--- a/openhands/core/config/utils.py+++ b/openhands/core/config/utils.py@@ -305,6 +305,11 @@ def get_or_create_jwt_secret(file_store: FileStore) -> str:def finalize_config(cfg: AppConfig) -> None:"""More tweaks to the config after it's been loaded."""# Handle the sandbox.volumes parameter+ if cfg.workspace_base is not None or cfg.workspace_mount_path is not None:+ logger.openhands_logger.warning(+ 'DEPRECATED: The WORKSPACE_BASE and WORKSPACE_MOUNT_PATH environment variables are deprecated. '+ "Please use RUNTIME_MOUNT instead, e.g. 'RUNTIME_MOUNT=/my/host/dir:/workspace:rw'"+ )if cfg.sandbox.volumes is not None:# Split by commas to handle multiple mountsmounts = cfg.sandbox.volumes.split(',')@@ -348,11 +353,6 @@ def finalize_config(cfg: AppConfig) -> None:# Handle the deprecated workspace_* parameterselif cfg.workspace_base is not None or cfg.workspace_mount_path is not None:- logger.openhands_logger.warning(- 'DEPRECATED: The WORKSPACE_BASE and WORKSPACE_MOUNT_PATH environment variables are deprecated. '- "Please use RUNTIME_MOUNT instead, e.g. 'RUNTIME_MOUNT=/my/host/dir:/workspace:rw'"- )-if cfg.workspace_base is not None:cfg.workspace_base = os.path.abspath(cfg.workspace_base)if cfg.workspace_mount_path is None: