Skip to content

Commit fa13d19

Browse files
authored
Accept all case diagnose send report confirm input (#711)
We prompt the user with the following when running the diagnose tool: ``` Send diagnostics report to AppSignal? (Y/n): ``` When a user submits this with "Y", we do not accept it. This was because the input checker only accepted for the lowercase value. I've lowercased all input, so that "Y", "y", "N" and "n" all work like they should in this confirmation prompt. Part of appsignal/support#204
1 parent 902b9b2 commit fa13d19

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
bump: "patch"
3+
type: "fix"
4+
---
5+
6+
Accept uppercase input in diagnose tool send report prompt. When prompted to send the report when the diagnose tool, it will now also accept uppercase values like "Y" and "N".

src/cli/diagnose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class Diagnose {
216216
rl.question(
217217
` Send diagnostics report to AppSignal? (Y/n): `,
218218
async function (answer: string) {
219-
switch (answer || "y") {
219+
switch ((answer || "y").toLowerCase()) {
220220
case "y":
221221
await self.sendReport(data)
222222
break

0 commit comments

Comments
 (0)