Skip to content

fix(infrastructure): use os.environ.get() instead of unexpanded shell variable in sys.path (#4945)#4972

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-4945
Apr 17, 2026
Merged

fix(infrastructure): use os.environ.get() instead of unexpanded shell variable in sys.path (#4945)#4972
mrveiss merged 1 commit intoDev_new_guifrom
issue-4945

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 16, 2026

Closes #4945

Summary

  • 30 Python scripts had sys.path.append("${AUTOBOT_PROJECT_ROOT:-/opt/autobot/code_source}") — Python never expands shell variable syntax, making the path entry a literal useless string
  • Replaced with sys.path.append(os.environ.get("AUTOBOT_PROJECT_ROOT", "/opt/autobot/code_source"))
  • Added import os where missing (24 files)
  • All 30 files pass python3 -m py_compile syntax check

… variable in sys.path.append (#4945)

Replace literal '${AUTOBOT_PROJECT_ROOT:-/opt/autobot/code_source}' strings (which Python never expands) with
os.environ.get("AUTOBOT_PROJECT_ROOT", "/opt/autobot/code_source") across 30 files. Add missing import os
where needed.
@mrveiss mrveiss merged commit ef77fe7 into Dev_new_gui Apr 17, 2026
1 of 3 checks passed
@mrveiss mrveiss deleted the issue-4945 branch April 17, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant