You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a typescript library which runs forge config --json to acquire the forge config.
This library started crashing out of the blue recently when my build system was executing hardhat compile. The error looked like this:
An unexpected error occurred:
SyntaxError: Unexpected non-whitespace character after JSON at position 5069 (line 186 column 1)
at JSON.parse (<anonymous>)
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (9d74675 2024-10-31T00:20:54.778420069Z)
What command(s) is the bug in?
forge config --json
Operating System
Linux
Describe the bug
I'm using a typescript library which runs forge config --json to acquire the forge config.
This library started crashing out of the blue recently when my build system was executing
hardhat compile
. The error looked like this:I wrote the buffer to file and inspected it
and you can see an ANSI control code at the end of the output.
Given the nature of my setup I found the best workaround was to set
NO_COLOR=1
prior to running hardhatThis line might be the culprit?
I'd suggest perhaps checking if the output is a tty before writing ANSI codes.
The text was updated successfully, but these errors were encountered: