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

Avoid JSON parsing errors caused by line wrapping #267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kazutoiris
Copy link

Fixes #266, where JSON parsing errors were occurring due to line wrapping in terminal outputs. After considering different solutions, I have implemented a fix. The following options were considered:

  1. (Selected) No Line Wrapping During joinToString: Since JSON indentation and formatting do not affect parsing, removing line breaks will not disrupt the parsing process.

  2. (Optional) Set colored to false: Another possible solution is to set the colored to false, which would allow the use of GeneralCommandLine. However, this approach disables terminal color output, which may not be desirable.

  3. (Optional) Adjusting PtyCommandLine's COLUMN Environment Variable: The COLUMN environment variable for PtyCommandLine can be adjusted to exceed 80 characters, which helps avoid line wrapping. But the maximum allowable value is 2500 characters, as the limit cannot be set to unlimited.

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.

PtyCommandLine causes automatic line wrapping, leading to JSON parsing errors
1 participant