Skip to content

Commit fc262d5

Browse files
robbycochranclaude
andcommitted
fix: address PR review feedback for devcontainer scripts
- Use jq for safe GITHUB_TOKEN interpolation in entrypoint.sh - Make theme configurable via CLAUDE_THEME env var (default: dark) - Move trap earlier in run.sh to ensure cleanup on early failures Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 76f1e6c commit fc262d5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.devcontainer/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
mkdir -p /home/dev/.claude/debug /home/dev/.commandhistory
44

55
# Set defaults so Claude Code doesn't prompt on startup
6-
claude config set --global theme dark 2> /dev/null || true
6+
claude config set --global theme "${CLAUDE_THEME:-dark}" 2> /dev/null || true
77
claude config set --global verbose false 2> /dev/null || true
88

99
# Register GitHub MCP server if token is available
1010
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
1111
if ! claude mcp add-json github \
12-
'{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer '"$GITHUB_TOKEN"'","X-MCP-Toolsets":"context,repos,pull_requests,issues,actions,git"}}' \
12+
"$(jq -n --arg token "$GITHUB_TOKEN" \
13+
'{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":("Bearer " + $token),"X-MCP-Toolsets":"context,repos,pull_requests,issues,actions,git"}}')" \
1314
--scope user 2> /dev/null; then
1415
echo "WARNING: Failed to register GitHub MCP server" >&2
1516
fi

.devcontainer/run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ USAGE
243243
*)
244244
preflight
245245
ACTIVE_WORKTREE=$(setup_worktree)
246+
trap on_exit EXIT
246247
BRANCH=$(git -C "$ACTIVE_WORKTREE" branch --show-current)
247248
TASK="$*"
248249

@@ -257,8 +258,6 @@ USAGE
257258
echo "Task: $TASK"
258259
echo "---"
259260

260-
trap on_exit EXIT
261-
262261
build_docker_args "$ACTIVE_WORKTREE"
263262
PROMPT="/dev-loop $TASK"
264263
if [[ "$TASK" == /* ]]; then

0 commit comments

Comments
 (0)