* Consent gate: publishing uploads the project to a PUBLIC url, so confirm * before proceeding. Returns true when the caller may publish + file.
(dir: string, yes: boolean)
| 51 | * before proceeding. Returns true when the caller may publish + file. |
| 52 | */ |
| 53 | async function confirmFileIssue(dir: string, yes: boolean): Promise<boolean> { |
| 54 | printIssueConsent(dir); |
| 55 | if (yes) return true; |
| 56 | if (!process.stdout.isTTY) { |
| 57 | console.log(` ${c.dim("Re-run with --yes to publish the repro and file the issue.")}\n`); |
| 58 | return false; |
| 59 | } |
| 60 | if (await promptConfirm()) return true; |
| 61 | console.log(`\n ${c.dim("Aborted. Feedback was still sent.")}\n`); |
| 62 | return false; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Publish a minimal repro and return its public URL. Degrades gracefully: |
no test coverage detected