From 45aa837f20373d146b7242d261408f9324f1fab8 Mon Sep 17 00:00:00 2001 From: Marshall Livingston Date: Thu, 5 Mar 2026 06:49:57 -0700 Subject: [PATCH] fix: skip share prompt when analysis parsing fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit promptExport() was checking `if (!analysis)` but a parseFailed analysis still passes that — it's an object, just a useless one with zeroed scores and empty findings. So the CLI would happily ask "Share results?" and offer to copy a blank card to clipboard. Now we treat parseFailed the same as no analysis: skip the export menu entirely and tell the user to retry with `oasis analyze`. --- src/lib/export.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/export.ts b/src/lib/export.ts index dc636a6..17df5b6 100644 --- a/src/lib/export.ts +++ b/src/lib/export.ts @@ -13,7 +13,7 @@ export async function promptExport( ksmScore?: number, ): Promise { console.log(); - if (!analysis) { + if (!analysis || analysis.parseFailed) { console.log(colors.gray(' No analysis available — skipping export.')); console.log(colors.gray(` Run analysis first: oasis analyze ${result.id}`)); console.log(colors.gray(` Then export via: oasis report ${result.id}`));