Skip to content

Commit ec7305d

Browse files
committed
fix environment propagation
1 parent 22e1b30 commit ec7305d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docker/start.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from opengrok_tools.deploy import deploy_war
4343
from opengrok_tools.mirror import OPENGROK_NO_MIRROR_ENV
4444
from opengrok_tools.sync import do_sync
45+
from opengrok_tools.utils.commandsequence import COMMAND_PROPERTY, ENV_PROPERTY
4546
from opengrok_tools.utils.exitvals import SUCCESS_EXITVAL
4647
from opengrok_tools.utils.indexer import Indexer
4748
from opengrok_tools.utils.log import (
@@ -294,12 +295,14 @@ def merge_commands_env(commands, env):
294295
:param env: environment dictionary
295296
:return: updated commands structure
296297
"""
297-
for cmd in commands:
298-
cmd_env = cmd.get("env")
299-
if cmd_env:
300-
cmd.env.update(env)
301-
else:
302-
cmd["env"] = env
298+
for entry in commands:
299+
cmd = entry.get(COMMAND_PROPERTY)
300+
if cmd:
301+
cmd_env = cmd.get(ENV_PROPERTY)
302+
if cmd_env:
303+
cmd_env.update(env)
304+
else:
305+
cmd[ENV_PROPERTY] = env
303306

304307
return commands
305308

0 commit comments

Comments
 (0)