fix(stylua-npm-bin): adjust axios config to work with proxy env variables #868
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
First of all, thanks for providing this code formatter on so many distribution channels 🙏🏻
We wanted to pull the wrapper from npm so we added it to our
yarn
dependencies.However, since we are behind a corporate proxy, the install just failed. More precisely,
axios
was not correctly resolving the GitHub redirects in addition to our proxy environment variables:Some output from our GitLab CI job
This is kind of a known issue, see axios/axios#2072 for instance.
This MR implements the fix proposed in axios/axios#4531 (comment).
If you are open to it, another option would be to get rid of
axios
. I see it is only used once so I could refactor the code and just switch to a nativenode
fetch. I could use the undici - fetch for instance: we recently contributed upstream to editorconfig-checker to also bring back support for http proxies 😉/cc @nejch @fgreinacher @bufferoverflow
🛠️ with ❤️ by Siemens