From 73af151f8d33e75a90e82380cfce25e50c911969 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Sun, 14 Dec 2025 17:39:22 +0000 Subject: [PATCH] wip Signed-off-by: 35C4n0r --- registry/coder/modules/claude-code/main.tf | 1 + .../coder/modules/claude-code/scripts/start.sh | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index 8d87c332..45a3b413 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -368,6 +368,7 @@ locals { export ARG_BOUNDARY_PPROF_PORT='${var.boundary_pprof_port}' export ARG_COMPILE_FROM_SOURCE='${var.compile_boundary_from_source}' export ARG_CODER_HOST='${local.coder_host}' + export ARG_NON_AGENTAPI_CLI=(!var.report_tasks && var.cli_app) ? true : false EOT # Reusable install script command diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index dac70e3f..281cf44a 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -5,10 +5,6 @@ set -euo pipefail true > "$HOME/start.log" -log() { - printf -- "$@" >> "$HOME/start.log" -} - command_exists() { command -v "$1" > /dev/null 2>&1 } @@ -30,6 +26,15 @@ ARG_ENABLE_BOUNDARY_PPROF=${ARG_ENABLE_BOUNDARY_PPROF:-false} ARG_BOUNDARY_PPROF_PORT=${ARG_BOUNDARY_PPROF_PORT:-"6067"} ARG_COMPILE_FROM_SOURCE=${ARG_COMPILE_FROM_SOURCE:-false} ARG_CODER_HOST=${ARG_CODER_HOST:-} +ARG_NON_AGENTAPI_CLI=${ARG_NON_AGENTAPI_CLI:-false} + +log() { + if [[ "${ARG_NON_AGENTAPI_CLI}" = "true" ]]; then + printf -- "$@" >> "$HOME/start.log" + else + printf -- "$@" + fi +} log "--------------------------------" @@ -48,6 +53,7 @@ log "ARG_BOUNDARY_LOG_LEVEL: %s\n" "$ARG_BOUNDARY_LOG_LEVEL" log "ARG_BOUNDARY_PROXY_PORT: %s\n" "$ARG_BOUNDARY_PROXY_PORT" log "ARG_COMPILE_FROM_SOURCE: %s\n" "$ARG_COMPILE_FROM_SOURCE" log "ARG_CODER_HOST: %s\n" "$ARG_CODER_HOST" +log "ARG_NON_AGENTAPI_CLI: %s\n" "$ARG_NON_AGENTAPI_CLI" log "--------------------------------"