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 broken fs.unlink call and add proxy support #151

Closed
wants to merge 1 commit into from
Closed

Fix broken fs.unlink call and add proxy support #151

wants to merge 1 commit into from

Conversation

michaelrommel
Copy link

@michaelrommel michaelrommel commented Jun 19, 2019

Fixes #150 and adds proxy support for those of us, who work behind a corporate proxy.

@michaelrommel
Copy link
Author

Hello, are you planning on integrating the patch? Thanks for a response!! Michael.

@wzhouwzhou
Copy link

Using console.log instead of console.error on errors is bad practice already, but double logging when the error is being thrown anyway makes it even worse. unlinkSync blocks the entire execution thread until the operation is finished and you've never try/catch'ed it which jeopardizes the rest of execution. The original error in #150 simply mandates the second argument of fs.unlink, none of what else you have added in this PR, more to follow...
I am also against introducing https-proxy-agent as another dependency that isn't even used during runtime. There is a set way to install with npm behind a corporate proxy via npm config as this is not a niche issue; please see if those solutions work for you before trying to impose it upon all users of the library. Another solution is to introduce a "backdoor" agent accessor that allows users of the API to manually specify their own http(s) agents, assuming people install with --ignore-scripts, and then run the install script programmatically.

"Let him that would move the world first move himself." -Socrates

@michaelrommel michaelrommel deleted the unlinkfix branch October 20, 2019 22:22
@michaelrommel
Copy link
Author

Yeah, good points - thanks for taking the time to respond. I have deleted the PR. Thanks again!

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.

Error installing on Windows
2 participants