Uh oh!
There was an error while loading. Please reload this page.
lib: print Python executable path using UTF-8 - #2987
Conversation
Please add a test or tests that fails with the old code and pass with the new code so we will be alerted if there are future regressions. |
The Python executable path may have non-ASCII characters, which can make the print function fail if the environment encoding is different. This fixes this issue by using stdout.buffer, which can be used with UTF-8 encoding for the output, regardless of the environment encoding. Fixes: nodejs#2829
996f826 to
8025dcdComparehuseyinacacak-janea
commented
Mar 7, 2024
@cclauss thanks for reviewing. I've added a test. |
lukekarrys
commented
Mar 8, 2024
Linting is failing in CI which is unfortunately preventing the tests from being run. I did check this out and run it locally on macOS and they were failing. It could be because the test assumes that the result of |
The linter errors are caused by a new version of |
huseyinacacak-janea
commented
Mar 12, 2024
@lukekarrys thank you for your feedback. I've updated the test to fix the failure on MacOS. |
lukekarrys
commented
Mar 13, 2024
@huseyinacacak-janea I think linting should now be fixed in main. Can you try updating your branch now? |
huseyinacacak-janea
commented
Mar 13, 2024
I rebased the branch to get the |
Checklist
npm install && npm run lint && npm testpassesDescription of change
The Python executable path may have non-ASCII characters, which can make the print function fail if the environment encoding is different. This PR fixes this issue by using
stdout.buffer, which can be used with UTF-8 encoding for the output, regardless of the environment encoding.Fixes: #2829