Commit Graph

24 Commits

Author SHA1 Message Date
Trevor Brown
f7e82ef14a
Merge pull request #84 from FreedomBen/shasum-missing-fix
Add handling for missing shasum
2018-12-02 14:29:15 -05:00
Ondrej Galbavy
d49479dbc4 Show proper error on invalid requested version 2018-10-20 20:42:40 +02:00
Trevor Brown
0f4ab109a2
Merge pull request #77 from SunDoge/set-mirror
Allow setting nodejs mirror url
2018-07-19 09:45:26 -04:00
Benjamin Porter
3bcfc82506 Add handling for missing shasum
On some platforms, including Fedora and derivatives, and Arch and
derivatives, the binary `shasum` does not exist.  Instead, sha256sum
should be used.

This patch checks for the existence of sha256sum, as well as shasum,
and uses whichever is present.  If none are present, a helpful error
message is printed out.

Tested on Fedora 28
  - Scenarios tested:

    -------------------------------
    | Sha256sum | shasum | Works? |
    |    Yes    |   No   |  Yes   |
    |    No     |   Yes  |  Yes   |
    |    Yes    |   Yes  |  Yes   |
    |    No     |   No   |  Yes   |
    -------------------------------
2018-06-28 19:26:05 -06:00
Trevor Brown
d98745d9a5
Move path to installed Node.JS binaries to the front of PATH 2018-06-14 08:23:31 -04:00
SunDoge
3d6c468770 ok to set taobao mirror 2018-05-12 01:25:18 +08:00
Maddison Hellstrom
6e8fc1fbab Override PATH env when calling npm install
A bug existed where, if no versions of `node` and `npm` are installed
already, running `asdf install node <version>` while having any packages
listed inside `.default-npm-packages` would fail to install those
default packages because the newly installed node version's `bin`
directory is not in the `PATH` yet.

Fixes #67
2018-05-04 22:43:28 -07:00
Randy Stauner
6ea988b663 Show error message when gpg is not found
fixes #61
2018-02-13 08:34:12 -07:00
Trevor Brown
1950ad3fed
Merge pull request #50 from pachonk/default-npm-packages
Add support for a default-npm-packages file
2017-12-18 11:40:19 -05:00
Trevor Brown
c7ebeffe99
Merge pull request #41 from petermm/patch-1
support arm 64bit (arm8)
2017-12-18 11:16:01 -05:00
Alex Piechowski
f3773e5371 Add support for a default-npm-packages file
Partial Credit: https://github.com/asdf-vm/asdf-ruby/pull/35
2017-07-30 23:54:07 -05:00
vic
be1deeebd3 Use a more portable version sort.
On some linux's sort command does not take the `-V` option (Alpine base image with busybox). Use a more portable `sort_versions` from rbenv. Also I guess this removes the dependency on gsort in OSX.
2017-07-23 05:39:44 -05:00
peter madsen
adef6e617f support arm 64bit (arm8)
uname -m returns aarch64 on arm8.

however nodejs serves the file as 'arm64' (eg. https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-arm64.tar.xz)

the arm6 and arm7 filenames looks to be correct.
2017-05-06 22:12:32 +02:00
Robin Schneider
7e3e6e53ff
Use ASDF_DIR environment variable if available
Related to: https://github.com/asdf-vm/asdf/pull/156
2017-03-16 23:02:02 +01:00
Zura Guerra
fed3e97b69 Change some commands in the install script to make it work for both Linux and MacOS 2017-02-22 17:35:31 -06:00
Robin Schneider
2d0460219d
mktemp on OSX only supports short command line parameters Oo
Related to: #15
2017-02-21 00:21:31 +01:00
Robin Schneider
001999f36c
Give user hint if trust might not be bootstrapped yet to ease upgrade 2017-02-20 08:39:49 +01:00
Robin Schneider
6c8bb8c9f4
Optimize script: Fix remaining shellcheck warnings, clean up /tmp 2017-02-20 06:58:03 +01:00
Robin Schneider
c213d9c20e
Check signatures/checksums to ensure authenticity
Please refer to [Verifying Node.js Binaries](https://blog.continuation.io/verifying-node-js-binaries/)
for why this is important.

Related to: https://github.com/asdf-vm/asdf/issues/158
Mitigates: https://github.com/nodejs/node/issues/9859
Mitigates: https://github.com/nodejs/node/issues/6821

Implementing this feature required some rework of the `install` script
which is included in this PR. The following other PR are
superseded/included in this one:

Closes: #15
Closes: #16
Closes: #19

Note that this PR also updates the base download URL from
"http://nodejs.org/dist" to "https://nodejs.org/dist" meaning that
before this PR (or #16 which is not merged), binaries where downloaded
over plain legacy HTTP! (those binaries where later executed by the
user). This is really bad and is fairly easy to exploit!

Related to: https://github.com/creationix/nvm/pull/736
Related to: https://github.com/creationix/nvm/issues/793
2017-02-20 06:58:02 +01:00
Eduardo Cunha
85cbe3b496 Change install script to use https on package download 2016-05-30 23:02:38 -03:00
Akash Manohar
4f850e5e49 Update git url 2016-02-09 22:40:09 +05:30
Akash Manohar J
ed3ad675f0 Add npm hook 2015-05-24 15:17:38 +05:30
Akash Manohar J
5138c05bb7 fix function call 2015-05-24 11:28:44 +05:30
Akash Manohar J
19edf42920 Initial commit with nodejs plugin 2015-05-24 09:56:04 +05:30