Skip to content

Fix shell variable interpolation in Python heredoc#5

Merged
sunchuljung merged 4 commits intofeature/architecture-fixfrom
copilot/sub-pr-4
Feb 4, 2026
Merged

Fix shell variable interpolation in Python heredoc#5
sunchuljung merged 4 commits intofeature/architecture-fixfrom
copilot/sub-pr-4

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Shell variables $CLAUDE_CONFIG and $TEMP_CONFIG were being interpolated incorrectly inside the Python heredoc in configure-claude-mcp.sh, causing the literal strings to be passed instead of their values.

Changes:

  • Pass shell variables as command-line arguments to Python: python3 - "$CLAUDE_CONFIG" "$TEMP_CONFIG"
  • Quote heredoc delimiter ('PYEOF') to prevent shell expansion
  • Read file paths from sys.argv with validation in Python script

Before:

merge_json_with_python() {
    python3 << PYEOF
# ...
with open("$CLAUDE_CONFIG", 'r') as f:  # Literal string, not interpolated

After:

merge_json_with_python() {
    python3 - "$CLAUDE_CONFIG" "$TEMP_CONFIG" << 'PYEOF'
# ...
base_config_file = sys.argv[1]
with open(base_config_file, 'r') as f:  # Proper argument handling

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 4, 2026 05:56
Co-authored-by: sunchuljung <108503957+sunchuljung@users.noreply.github.com>
Co-authored-by: sunchuljung <108503957+sunchuljung@users.noreply.github.com>
Co-authored-by: sunchuljung <108503957+sunchuljung@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on architecture update for rune-admin integration Fix shell variable interpolation in Python heredoc Feb 4, 2026
Copilot AI requested a review from sunchuljung February 4, 2026 05:58
@sunchuljung sunchuljung marked this pull request as ready for review February 4, 2026 06:07
@sunchuljung sunchuljung merged commit a22b834 into feature/architecture-fix Feb 4, 2026
@sunchuljung sunchuljung deleted the copilot/sub-pr-4 branch February 15, 2026 14:42
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.

2 participants