Commit Graph

13 Commits

Author SHA1 Message Date
Trevor Brown
27f7ef7852
fix: don't invoke asdf inside asdf commands (#1208)
* fix: don't invoke asdf inside asdf commands

Recursive calls have a number of disadvantages:

* Poorer performance since each invocation spawns and new process and re-executes all the code in bin/asdf
* Makes debugging more difficult
* More likely to introduce subtle bugs and the possibility for infinite loops
2022-04-25 08:45:19 -04:00
Trevor Brown
87137e4103
fix: Ban ls command (#1141)
* Ban `ls` command
* Update banned commands test so it only checks bash and sh files
* Only allow `ls` for resolving symlinks
* Replace `ls` commands with `find`
2021-12-29 12:10:39 -05:00
Alberto de Murga
9430a39aef
feat: Displays a warning when a plugin from the tools-version list does not exist (#1033)
* feat: Displays a warning when the plugin from the tools-version does not exist

When calling the install command, it tried to look for versions for all
the plugins available and installed them. With this change, it will attempt to
find versions for all the installed plugins and plugins defined in the
`.tool-versions`.

Fixes https://github.com/asdf-vm/asdf/issues/574

* feat: Changes the algorithm to detect not installed plugins

This patch changes the algorithm. It preserves the original logic for
the plugin resolution, but at the same time, reports entries with plugins not
available.

* fix: Addresses the pull request comments.

- Changes the comparison to be strict rather than partial.
- Prints a list of missing plugins.
- Exists if at least one plugin is not present.
- Adds unit tests.
2021-10-01 08:38:57 -04:00
Trevor Brown
2ad0f5ea45
fix: allow plugin callbacks to be in any language (#995) 2021-07-30 08:44:14 +10:00
Matt
a7d3661f6c
fix: insert error handling in list-all & download plugin scripts (#881) 2021-05-19 19:51:45 +10:00
Trevor Brown
8bbefba072
chore: ban echo command (#806) 2020-09-22 08:27:52 +10:00
Dan Fuchs
6a1855e26f Install one tool specified in .tool-versions
`asdf install <name>` installs that single tool at the version specified
in `.tool-versions`.  If there is no `.tool-versions` or if that tool is
not in it, an error message is shown and `asdf` exits `1`.

Implements #759
2020-07-09 18:16:50 -05:00
James Hegedus
50feef2a77
fix: CI formatting use editorconfig (#751) 2020-06-30 09:16:35 +10:00
Trevor Brown
f28c518dc7 Address shellcheck warnings 2020-05-05 08:57:42 -04:00
Trevor Brown
309a4f1a12 Don't delete the download directory if the --keep-download flag is passed or the always_keep_download config is set to yes 2020-05-04 15:05:10 -04:00
Trevor Brown
a886303065 Remove duplicate mkdir calls in install_tool_version function 2020-05-04 10:51:07 -04:00
Trevor Brown
ac62c7c4d4 Invoke the plugin's download script before invoking the plugin's install script 2020-03-06 19:15:06 -05:00
Trevor Brown
52cbf1165c Add .bash file extensions to files containing code executed by Bash 2020-03-02 12:48:05 -05:00