From 950adfcad2b2582ea7fa105a15154f51badf10cd Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Sun, 28 Dec 2025 21:45:22 -0800 Subject: [PATCH] fix: redirect debug output to stderr in talos-embed-config hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generate_config function was printing messages to stdout, which got captured along with the config file path. This caused the cp command to fail with the debug output as the source file path. Now only the config file path is output to stdout; all other messages go to stderr for display. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- images/hooks/talos-embed-config.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/images/hooks/talos-embed-config.sh b/images/hooks/talos-embed-config.sh index e823ee3..b4bb186 100755 --- a/images/hooks/talos-embed-config.sh +++ b/images/hooks/talos-embed-config.sh @@ -94,12 +94,12 @@ get_talos_version() { # Generate machine configuration using talhelper generate_config() { - echo "Generating machine configuration..." + echo "Generating machine configuration..." >&2 cd "${TALOS_DIR}" # Generate configs to work directory - talhelper genconfig --out-dir "${WORK_DIR}/clusterconfig" + talhelper genconfig --out-dir "${WORK_DIR}/clusterconfig" >&2 # Find the config file for the specified node local cluster_name @@ -114,7 +114,8 @@ generate_config() { exit 1 fi - echo " Generated config: ${config_file}" + echo " Generated config: ${config_file}" >&2 + # Only the path goes to stdout for capture echo "${config_file}" }