Download and install via tarball instead of NPM#8
Download and install via tarball instead of NPM#8webwarrior-ws wants to merge 1 commit intotarsgate:masterfrom
Conversation
bc34195 to
488f42f
Compare
|
And let's rebase. |
8da46b8 to
7376db5
Compare
7376db5 to
c424f4d
Compare
|
Let's change one more thing here. In case the -e flag is used, and the -n flag is not used, let's launch a "which npm" process, and if that process fails (because probably npm is not installed), then install awto-pi-lot extension via git instead of npm. |
When trying to test it, it occurred to me that without npm we can't start installation process. |
That's why we're coding this change! so that if someone prefers tarball installation then she doesn't use the -n flag. Did you read it backwards? |
c424f4d to
71392cc
Compare
Installation is done by running either |
Oh, you mean the launch of skynot itself, right? Mmm good point |
71392cc to
abebbfc
Compare
|
Now that with this type of download we can know what's the progress on it, let's add a progress bar so that we know if it's stuck (this is very useful for me since I have bad connection these days). |
If you run installation with verbose flag, |
abebbfc to
17015c5
Compare
17015c5 to
69fa213
Compare
Ah ok, acceptable. But then let's only use the verbose flag of wget when skynot is being used with the verbose flag. |
And for tar! |
I don't use any flags on wget. It's the logic of |
69fa213 to
4a4f8e4
Compare
Changed to using long flag names in tar command. |
What do you mean man? Have you checked what runAsPi() does with the verbose flag? it's just being used for the sudo call; so it doesn't have any effect on wget |
Line 95 in 878a182 |
|
Ok that actually tells me that the way you have done this is wrong. Sudo should only be used for the things that REQUIRE sudo, and downloading with wget does not. Please dismember that big command to only use sudo for the thing that really needs sudo: installing in $installDir. |
The NPM option is still available with the `-n`/`--npm` flag. Fixes tarsgate#2
4a4f8e4 to
8559be7
Compare
Split command into 2: one for download, one for unpacking (run as pi user). |
|
Why are you creating a new runCommand func? |
Because we don't have a function that runs a command? Only the on that runs with sudo. |
WRONG! execAsync() is there!! |
With execAsync() progress bar is not shown. |
|
Then we adjust execAsync, we DONT DUPLICATE IT |
There is nothing to adjust. |
|
Sigh man I don't understand why you make this so complicated, when it's very simple really. There's already a way to call processes: exec It turns out you need a way to call processes but needing a verbose flag. Then there are 2 obvious options on how to do this here:
|
|
The NPM option is still available with the
-n/--npmflag.Fixes #2