Skip to content

Commit 35426a0

Browse files
authored
fix warning for workspace_base (All-Hands-AI#8667)
1 parent 598d19c commit 35426a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

openhands/core/config/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ def get_or_create_jwt_secret(file_store: FileStore) -> str:
305305
def finalize_config(cfg: AppConfig) -> None:
306306
"""More tweaks to the config after it's been loaded."""
307307
# Handle the sandbox.volumes parameter
308+
if cfg.workspace_base is not None or cfg.workspace_mount_path is not None:
309+
logger.openhands_logger.warning(
310+
'DEPRECATED: The WORKSPACE_BASE and WORKSPACE_MOUNT_PATH environment variables are deprecated. '
311+
"Please use RUNTIME_MOUNT instead, e.g. 'RUNTIME_MOUNT=/my/host/dir:/workspace:rw'"
312+
)
308313
if cfg.sandbox.volumes is not None:
309314
# Split by commas to handle multiple mounts
310315
mounts = cfg.sandbox.volumes.split(',')
@@ -348,11 +353,6 @@ def finalize_config(cfg: AppConfig) -> None:
348353

349354
# Handle the deprecated workspace_* parameters
350355
elif cfg.workspace_base is not None or cfg.workspace_mount_path is not None:
351-
logger.openhands_logger.warning(
352-
'DEPRECATED: The WORKSPACE_BASE and WORKSPACE_MOUNT_PATH environment variables are deprecated. '
353-
"Please use RUNTIME_MOUNT instead, e.g. 'RUNTIME_MOUNT=/my/host/dir:/workspace:rw'"
354-
)
355-
356356
if cfg.workspace_base is not None:
357357
cfg.workspace_base = os.path.abspath(cfg.workspace_base)
358358
if cfg.workspace_mount_path is None:

0 commit comments

Comments
 (0)