Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bare strings break colorize #473

Merged
merged 13 commits into from
Dec 5, 2024
Merged

Bare strings break colorize #473

merged 13 commits into from
Dec 5, 2024

Conversation

ecooper
Copy link

@ecooper ecooper commented Dec 4, 2024

Problem

Bare strings would choke when colorizing.

0ba2e12a-9f6d-46de-a255-bd6b212c5737

Solution

Stringify before colorizing.

Screenshot 2024-12-04 at 3 35 31 PM

@ecooper ecooper requested a review from a team as a code owner December 4, 2024 23:36
@ecooper ecooper changed the title If you ou Bare strings break colorize Dec 4, 2024
src/lib/misc.mjs Outdated
@@ -67,5 +67,5 @@ export function formatFullErrorForShell(err, { color = true } = {}) {
return JSON.stringify(err, null, 2);
}

return colorize(err);
return colorize(JSON.stringify(err));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably worth a quick regression test?

@ecooper ecooper merged commit 9585314 into v3 Dec 5, 2024
4 checks passed
@ecooper ecooper deleted the v3-fix-json branch December 5, 2024 16:23
This was referenced Dec 6, 2024
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@wildemat wildemat mentioned this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants