From 022fd1c0dd47d8b6c14a051a1f054a6d85357331 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Sun, 5 Apr 2026 00:40:14 +0000 Subject: [PATCH] fix(claude-code): expand tilde and \$HOME in boundary config path before symlink Addresses Copilot review comment on PR #797: when ARG_BOUNDARY_CONFIG_PATH contains a leading ~ or literal \$HOME (e.g. ~/.config/...), it was passed as-is to ln -sf without shell expansion, resulting in a broken symlink. Now expands both forms before creating the symlink. Closes coder/registry#797 Generated with OpenClaw using Claude --- registry/coder/modules/claude-code/scripts/start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 488d9a29..7950a56c 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -239,6 +239,9 @@ function start_agentapi() { exit 1 fi elif [ -n "$ARG_BOUNDARY_CONFIG_PATH" ]; then + # Expand leading tilde and literal $HOME so paths like ~/.config/... work correctly + ARG_BOUNDARY_CONFIG_PATH="${ARG_BOUNDARY_CONFIG_PATH/#\~/$HOME}" + ARG_BOUNDARY_CONFIG_PATH="${ARG_BOUNDARY_CONFIG_PATH/\$HOME/$HOME}" printf "Linking boundary config from %s to %s\n" "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE" if [ "$ARG_BOUNDARY_CONFIG_PATH" != "$BOUNDARY_CONFIG_FILE" ]; then mkdir -p "$BOUNDARY_CONFIG_DIR"