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

fix: parsing for non-english systems, part 2 #26

Merged
merged 4 commits into from Nov 24, 2023

Conversation

jimnys-8
Copy link
Contributor

@jimnys-8 jimnys-8 commented Nov 8, 2023

#24 didn't fully fix the problem with parsing on non-English systems. isPrintComplete requires that both print and its own lpstat outputs English, otherwise the parsing fails and it will always return false.
In fact, execAsync always needs to output English, so instead of adding SOFTWARE= LANG=C to each command in the codebase, I rewrote execAsync so that it always adds the environment variables there. Is this an okay change, or do you plan on using execAsync for other purposes where the variables aren't needed?

PS. I changed the type definition for ExecResponse, since stdout and stderr should never be null. The code mostly ignores the possible null anyway, and npm build:declarations would throw a bunch of errors before this change.

@artiebits
Copy link
Owner

@jimnys-8 thanks for your contribution

@artiebits artiebits merged commit c8965ce into artiebits:master Nov 24, 2023
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.

None yet

2 participants