From a371562d942be0e517d564428a20e223a556b199 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Tue, 11 Feb 2025 17:30:40 -0500 Subject: [PATCH] refactor: do not add DEBUG env var when it is not set (#6690) --- openhands/runtime/impl/remote/remote_runtime.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openhands/runtime/impl/remote/remote_runtime.py b/openhands/runtime/impl/remote/remote_runtime.py index c54bb69dbdde..068461cc61fb 100644 --- a/openhands/runtime/impl/remote/remote_runtime.py +++ b/openhands/runtime/impl/remote/remote_runtime.py @@ -212,11 +212,9 @@ def _start_runtime(self): plugins=self.plugins, app_config=self.config, ) - environment = { - 'DEBUG': 'true' - if self.config.debug or os.environ.get('DEBUG', 'false').lower() == 'true' - else '', - } + environment = {} + if self.config.debug or os.environ.get('DEBUG', 'false').lower() == 'true': + environment['DEBUG'] = 'true' environment.update(self.config.sandbox.runtime_startup_env_vars) start_request = { 'image': self.container_image,