-
Notifications
You must be signed in to change notification settings - Fork 106
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
download file to __dirname instead of os.tmpdir() #36
Conversation
Yea! The test would be to install this on a machine with /usr/local/bin owned by root and see if works without --unsafe-perm |
@mafintosh I want to run this by you before I do it so I don't hose my permissions: sudo chown root /usr/local/bin
node ./build/cli.js --version=1.4.4
sudo chown $(whoami) /usr/local/bin Does that look right? |
@zeke you wanna do it recursively with -R, sudo chown username -R /usr/local/bin |
Hey @zeke, I'm actually not 100% what is going wrong here. It looks like electron-prebuilt is downloaded to a temp directory, but there is an error when trying to move it? |
@groundwater yea we're experimenting with getting around an install error that happens when you install using root. npm will downgrade the user to |
It "worked", but seems inconclusive as the same steps work on the master branch too:
|
@mafintosh any suggestions on how to do a more conclusive test of this fix? |
👍 Downloading to tmp directory instead of |
@mafintosh It is good change. Current implementation of |
Thanks for the input, @develar. Please let me know how your testing goes, @mafintosh |
This sounds like it will also fix #39. |
I implemented atomic rename — develar@b40b6cf Downloading to cache dir allows me to use macOS directory from VM Linux machine (Parallels shared folder).
After my changes it works. I will create PR when it will be tested in the electron-builder. (electron-builder test runner downloads 6 electron versions for different platforms/archs in parallel). |
@develar are you proposing that approach as an alternative to this PR? |
@zeke Yes. Because |
@develar that's fine with me. Not married to a particular solution. Whatever works! |
Possibly fixes electron-userland/electron-prebuilt#139
cc @mafintosh. Is this what you were suggesting?