Skip to content

Commit

Permalink
fix: test / dedent does not support ansi
Browse files Browse the repository at this point in the history
  • Loading branch information
stefreak committed Sep 11, 2023
1 parent e07302b commit faad4bd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/exceptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,16 @@ export class InternalError extends GardenError {
bugReportInformation = `${stripAnsi(context)}\n${bugReportInformation}`
}

return chalk.red(`${chalk.bold("Encountered an unexpected Garden error. This is likely a bug 🍂")}\n\nYou can help by reporting this on GitHub: ${getGitHubIssueLink(`Crash: ${this.message}`, "crash")}\n\nPlease attach the following information to the bug report after making sure that the error message does not contain sensitive information:\n\n${chalk.gray(bugReportInformation)}`)
const header = "Encountered an unexpected Garden error. This is likely a bug 🍂"
const body = dedent`
You can help by reporting this on GitHub: ${getGitHubIssueLink(`Crash: ${this.message}`, "crash")}
Please attach the following information to the bug report after making sure that the error message does not contain sensitive information:
${chalk.gray(bugReportInformation)}
`

return chalk.red(`${chalk.bold(header)}\n${body}`)
}
}

Expand Down

0 comments on commit faad4bd

Please sign in to comment.