mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix warning for workspace_base (#8667)
This commit is contained in:
parent
598d19cd5d
commit
35426a04d8
@ -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 mounts
|
||||
mounts = cfg.sandbox.volumes.split(',')
|
||||
@ -348,11 +353,6 @@ def finalize_config(cfg: AppConfig) -> None:
|
||||
|
||||
# Handle the deprecated workspace_* parameters
|
||||
elif 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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user