fix(kuna): retain fallback diagnostics for empty stderr

Refs #4374.

Preserve the command error when stderr contains no diagnostic text.
This commit is contained in:
morluto committed 2026-10-17 00:44:02 +08:00
1 parent 313a86a369
commit 6d52814070
1 file changed
+1 -1
+1 -1
View File
@@ -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}`,
}),
};
};