From a3ac438d5155e1fd79291bb8d82ac59a9971ce8e Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Sat, 11 Apr 2026 20:07:27 +0000 Subject: [PATCH] fix(claude-code): check boundary_config_path source exists before creating symlink Move the source-file existence check before the ln -sf call so we never create a broken symlink. Previously the check happened after the symlink was already created, leaving a dangling symlink on disk before exiting. Generated with OpenClaw using Claude --- registry/coder/modules/claude-code/scripts/start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 82dad597..dd1ff26d 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -240,14 +240,14 @@ function start_agentapi() { fi elif [ -n "$ARG_BOUNDARY_CONFIG_PATH" ]; then 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" - ln -sf "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE" - fi if [ ! -f "$ARG_BOUNDARY_CONFIG_PATH" ]; then printf "Error: boundary_config_path '%s' does not exist or is not a regular file. Ensure the file exists at this path before starting.\n" "$ARG_BOUNDARY_CONFIG_PATH" >&2 exit 1 fi + if [ "$ARG_BOUNDARY_CONFIG_PATH" != "$BOUNDARY_CONFIG_FILE" ]; then + mkdir -p "$BOUNDARY_CONFIG_DIR" + ln -sf "$ARG_BOUNDARY_CONFIG_PATH" "$BOUNDARY_CONFIG_FILE" + fi if [ ! -s "$BOUNDARY_CONFIG_FILE" ]; then printf "Error: boundary configuration file '%s' does not exist or is empty. Check that '%s' exists and is not empty.\n" "$BOUNDARY_CONFIG_FILE" "$ARG_BOUNDARY_CONFIG_PATH" >&2 exit 1