From 6d528140702d4af2f8e7a28416cfc520cdd50955 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sat, 17 Oct 2026 00:33:07 +0800 Subject: [PATCH] fix(kuna): retain fallback diagnostics for empty stderr Refs #4374. Preserve the command error when stderr contains no diagnostic text. --- src/kuna/KunaCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kuna/KunaCommand.ts b/src/kuna/KunaCommand.ts index a1629feca3..b4f98dda60 100644 --- a/src/kuna/KunaCommand.ts +++ b/src/kuna/KunaCommand.ts @@ -346,7 +346,7 @@ const commandFailure = ( kind: "failed", error: new ProviderAdapterError(KUNA_PROVIDER_ID, operation, { ...details, - userMessage: `kuna ${subcommand} failed${exitCode === undefined || exitCode === null ? "" : ` with exit code ${String(exitCode)}`}: ${capturedOutput?.stderr.trim().split("\n").at(-1) ?? cause.message}`, + userMessage: `kuna ${subcommand} failed${exitCode === undefined || exitCode === null ? "" : ` with exit code ${String(exitCode)}`}: ${capturedOutput?.stderr.trim().split("\n").at(-1) || cause.message}`, }), }; };