Skip to content

Commit

Permalink
Fix formatting bug on module_misc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Nov 24, 2024
1 parent 0aeec83 commit 870f996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automation/script/module_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,12 +1251,12 @@ def regenerate_script_cmd(i):
# Cleanup from env everything that has a host path value
if i_run_cmd.get('env'):
for key in list(i_run_cmd.get('env')):
if isinstance(i_run_cmd['env'][key], str):
if isinstance(i_run_cmd['env'][key], str) and ((os.path.join("local", "cache", "") in i_run_cmd['env'][key]) or (os.path.join("CM", "repos", "") in i_run_cmd['env'][key])):
del (i_run_cmd['env'][key])
elif isinstance(i_run_cmd['env'][key], list):
values_to_remove = []
for val in i_run_cmd['env'][key]:
if isinstance(val, str):
if isinstance(val, str) and ((os.path.join("local", "cache", "") in val) or (os.path.join("CM", "repos", "") in val)):
values_to_remove.append(val)
if values_to_remove == i_run_cmd['env'][key]:
del (i_run_cmd['env'][key])
Expand Down

0 comments on commit 870f996

Please sign in to comment.