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/binDoes 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?