Commit Graph

282 Commits

Author SHA1 Message Date
Augusto Moura
ee8daa2b75
feat: remove previous integrity check logic 2021-11-23 23:35:25 -03:00
Augusto Moura
c4e335f872
feat: modify install to use node-build behind the scenes 2021-11-23 23:08:14 -03:00
Augusto Moura
800e244e78
feat: add commands for managing an internal node-build installation 2021-11-23 21:23:30 -03:00
Augusto Moura
54113a909b
feat: add parsing for lts/* aliases on legacy files (#194)
* feat: add parsing for lts/* aliases on legacy files
* refactor: better sed replace pattern
* fix: add correct replacement for lts/*
2021-11-11 10:13:39 -05:00
Pascal Martel
1bc55cb601
Fallback on source code build when no binary available (#207) 2021-10-29 21:40:13 -04:00
Augusto Moura
794b653b2a
Merge pull request #265 from M1kep/fix-cache-early-exit-v2
Fix print_index_tab to ensure cache is written
2021-10-11 14:24:34 -03:00
Michael Poutre
ce7652263a
Fix print_index_tab to ensure cache is written
Prior to this change the `tee` call was susceptible to its output being closed causing the pipeline to exit with `SIGPIPE`. This change replaces `tee` with two parts. 

1. Write directly to `"$index_file"`
2. `cat` the contents of `"$index_file"` to `stdout`. 

This way, if the receiving side of the pipe exits, `cat` will exit without impacting the index cache

Reimplements #264
2021-10-08 15:11:40 -07:00
Michael Poutre
18f2a58981
Revert "Fix resolve_version_query to not kill tee in filter_version_candidates (#264)"
This reverts commit a32e6c9751.
2021-10-08 14:56:17 -07:00
Michael Poutre
a32e6c9751
Fix resolve_version_query to not kill tee in filter_version_candidates (#264)
Prior to this change the awk 'prog' contained an exit command. When tee attempted to write to the stdout at this point, it received a SIGPIPE signal and exited with an error code of 141. I can't seem to find a way to have tee ignore this signal, but I don't believe the overhead of awk doing a small comparison will have a large/any performance impact especially relative to the processing in filter_version_candidates

Fixes #263
2021-10-07 08:15:13 -04:00
Augusto Moura
c873ec9d13
Merge pull request #262 from augustobmoura/feat/shim-fallback-bin-search
Add fallback method of finding the npm bin on the shim
2021-10-02 22:48:48 -03:00
Augusto Moura
782a2f87c4
fix: fix plugin_name with wrong value 2021-10-02 22:44:34 -03:00
Augusto Moura
000c048edd
fix: remove unused quote_path fucntion 2021-10-02 22:41:53 -03:00
Augusto Moura
ba13ea3e67
fix: fix print call instead of printf 2021-10-02 21:31:22 -03:00
Augusto Moura
a9c3e49531
feat: add fallback method of finding the npm bin 2021-10-02 20:52:47 -03:00
Guilherme Almeida
95a2091f7b
Fixes bug where plugin path is incorrect (#249) (#251)
* fix: 🐛 bug where plugin path is incorrect (#249)
* fix: supports spaces in the path

Co-authored-by: Augusto Moura <me@augustomoura.com>
2021-07-22 14:45:35 -04:00
Christoph Geschwind
e2d0822f05
Fix Installation Instructions (#247)
The `<name>` param of `asdf plugin add <name> [<git-url>]` got lost, resulting in:

```
$ asdf plugin add https://github.com/asdf-vm/asdf-nodejs.git
plugin https://github.com/asdf-vm/asdf-nodejs.git not found in repository
```
2021-07-21 08:06:07 -04:00
Augusto Borges de Moura
369c064003
Merge pull request #246 from augustobmoura/fix/add-cleanup-postinstall
fix: add a cleanup postinstall
2021-07-19 20:25:55 -03:00
Augusto Moura
379112e1ec
fix: add a cleanup postinstall
To remove the older mechanism of auto-reshimming in already existing
installations
2021-07-19 20:23:40 -03:00
Augusto Borges de Moura
c0f37e2d14
Merge pull request #232 from augustobmoura/feature/npm-wrapper
refactor(auto-reshim): add npm wrapper and remove npm hooks
2021-07-19 19:32:13 -03:00
Augusto Moura
a8da424811
style: typo 2021-07-19 19:30:43 -03:00
Augusto Moura
12ce1bfd81
fix: adds support for pipe in paths 2021-07-19 15:44:21 -03:00
Augusto Moura
4d9196d0ad
feat(shims): implement new wrapper strategy
Now we are using a shim template, we find the true binary in the path
and then call asdf reshim only when necessary
2021-07-19 15:26:56 -03:00
Augusto Moura
ad32fc9918
Merge branch 'master' into feature/npm-wrapper 2021-07-19 14:39:56 -03:00
Josh Taylor
ea133489c6
Remove broken keyservers (#240)
Co-authored-by: Josh <you@example.com>
2021-06-25 10:39:03 -04:00
Victor Chagas Seibert
7efbf9badb
Updating plugin add command (#238)
The command is in the old version
2021-06-16 09:18:52 -04:00
Augusto Moura
afef8037e4
chore: add more spacing in the plugin-add message 2021-05-16 21:14:54 -03:00
Augusto Moura
54945fc70f
chore: flip executable flag of the post-plugin-add 2021-05-16 21:12:59 -03:00
Augusto Moura
48bda37236
chore: typos 2021-05-16 21:09:27 -03:00
Augusto Moura
6ddcdfdb81
refactor(auto-reshim): add npm wrapper and remove npm hooks
Instead of relying in npm global installation hook for auto reshimming,
a pretty obscure functionality of npm, I just wrote a wrapper script
that intercept calls for npm and invokes asdf reshim whenever necessary.

The wrapper needs to be configured manually by the user, following the
practices of other plugins with similar settings.

I also wrote an utility for printing the current wrapper path easing the
configuration of new environments.

README now has an example of how to configure auto-reshimming.

There's also a notice on plugin installation about setting up the
auto-reshimming configuration.

A notice was also added to the install command, so that we reach more
people about the changes.
2021-05-16 21:06:10 -03:00
Augusto Borges de Moura
d2adc081be
Merge pull request #229 from Roman2K/master
Add support for ASDF_CONCURRENCY
2021-05-01 19:08:51 -03:00
villu164
cb61e3ddf9
Update install for better error message (#230)
* Clarify improved GPG error message.

Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
2021-04-20 08:17:09 -04:00
Roman Le Négrate
45024fd545
add support for ASDF_CONCURRENCY 2021-04-17 21:50:40 +02:00
Augusto Borges de Moura
b38dda3594
Merge pull request #214 from augustobmoura/feature/add-asdf-vm-install-docs
Refine the install section in README
2021-04-12 15:53:43 -03:00
Augusto Moura
d56626aadd Merge branch 'blimmer-blimmer-patch-1' 2021-04-09 13:41:15 -03:00
Sora Morimoto
33be686716 Fix path priority for global npm (#212)
* Fix path priority for global npm

Signed-off-by: Sora Morimoto <sora@morimoto.io>

* Remove bin/exec-path

Signed-off-by: Sora Morimoto <sora@morimoto.io>
2021-04-09 13:41:07 -03:00
Yaroslav Rogov
e0f49386c9 feat: Implement index tab cache (#219)
* feat: Implement index tab cache
* feat: Switch to etag-based caching
* Update lib/utils.sh

Co-authored-by: Augusto Borges de Moura <augusto.borgesm@gmail.com>
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
2021-04-09 13:41:07 -03:00
Yaroslav Rogov
b87aca1b9a Fix tac on OSX if coreutils are linked in path (#216)
* Fix tac on osx if coreutils are linked in path
* Change fallback condition for `tac`. Provide space-safe implementation
2021-04-09 13:41:07 -03:00
john r. durand
96989eb127 Remove delcared coreutils dependency, correct macOS. 2021-04-09 13:41:07 -03:00
john r. durand
6778954108 Fix use of tac on macOS. 2021-04-09 13:41:07 -03:00
Dave Ashby
9a093d4be5 tweak automatic key import 2021-04-09 13:41:07 -03:00
Dave Ashby
c87a52c5c2 Update README to reflect automatic import of keys 2021-04-09 13:41:07 -03:00
Dave Ashby
e0f170fc52 tweak gpg check and add automatic key installation 2021-04-09 13:41:07 -03:00
Dave Ashby
addbaaa751 Add check to see if key already exists locally before querying keyservers 2021-04-09 13:41:07 -03:00
Michael Cho
b1dfaa2eb7 replace Bash 4+ lowercase logic with POSIX alternative using 'tr' 2021-04-09 13:41:07 -03:00
Augusto Moura
260927f62a remove dependency on bash 4 associative arrays 2021-04-09 13:41:07 -03:00
Augusto Moura
c3c219ab9d fix: remove hashbang front utils 2021-04-09 13:41:07 -03:00
Augusto Moura
a82ac52b05 use pure bash to filter version candidates
instead of awk
2021-04-09 13:41:07 -03:00
Augusto Moura
e6ace0fca5 separate install functions between alias and canon 2021-04-09 13:41:07 -03:00
Augusto Moura
6b287904e4 install alias as symlinks to real versions 2021-04-09 13:41:07 -03:00
Augusto Moura
f46bfa8a17 fix lts/ breaking asdf dir versioning 2021-04-09 13:41:06 -03:00