From ff2d3c2241bb7bca69518334c20d587fcebbcfc3 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Tue, 14 Jul 2026 15:44:51 +1000 Subject: [PATCH] fix(desktop): surface empty-target ACP staging notice in --print-bin-dir runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ensure-acp-tools.sh printed "No ACP tools locked for target ..." only in the non---print-bin-dir branch, so the exact invocation path release builds take (prepare-acp-tools-resource.sh capturing --print-bin-dir output) suppressed the notice entirely. An empty-target staging — the failure mode the lock-merge fix guards against — left no trace in build logs and was only discoverable later via Doctor showing the bridges as not installed. Emit the notice to stderr unconditionally before the --print-bin-dir branch: stderr keeps the --print-bin-dir stdout contract (a single bin dir path) intact while making the empty staging visible in release build logs, matching the script's other diagnostics ("Installing ACP tool ..." already goes to stderr). Addresses the suppressed-notice finding from the bundling-series code review (review 2ed3d00d on b52a665a). Verification: - --target fake-unknown-target --print-bin-dir: notice on stderr, stdout is exactly the bin dir path, exit 0 - --target fake-unknown-target (no flag): notice on stderr, empty stdout, exit 0 - real host target --print-bin-dir: no-op stage, prints only the bin dir path, exit 0 Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- desktop/scripts/ensure-acp-tools.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/scripts/ensure-acp-tools.sh b/desktop/scripts/ensure-acp-tools.sh index ddee056ca..da1b91c15 100755 --- a/desktop/scripts/ensure-acp-tools.sh +++ b/desktop/scripts/ensure-acp-tools.sh @@ -132,10 +132,11 @@ entry_count="$(node -e 'process.stdout.write(String(JSON.parse(process.argv[1]). mkdir -p "$bin_dir" if [[ "$entry_count" == "0" ]]; then find "$bin_dir" -type f -delete + # stderr so the notice shows up in release build logs even when stdout is + # reserved for --print-bin-dir consumers (prepare-acp-tools-resource.sh). + echo "No ACP tools locked for target $target." >&2 if [[ "$print_bin_dir" == "1" ]]; then printf '%s\n' "$bin_dir" - else - echo "No ACP tools locked for target $target." fi exit 0 fi