Commit Graph

7 Commits

Author SHA1 Message Date
Jochen Schalanda
3c3f0e67f6
Rename custom plugin-add/plugin-remove for plugins (#684)
Rename custom scripts for `plugin-add` and `plugin-remove` phases in plugins to make clear when they are executed:

`plugin-add` -> `post-plugin-add`
`plugin-remove` -> `pre-plugin-remove`
2020-03-22 12:57:54 +11:00
Jochen Schalanda
57186be6d9
Support customizing plugin-add and plugin-remove
* Add support for custom `plugin-add` and `plugin-remove` in plugins
* Add configurable command hooks for plugin installation and removal

```shell
pre_asdf_plugin_remove = echo will remove plugin ${1}
pre_asdf_plugin_remove_foo = echo will remove plugin foo
post_asdf_plugin_remove = echo removed plugin ${1}
post_asdf_plugin_remove_foo = echo removed plugin foo
```

Closes #670
2020-03-21 14:59:33 +01:00
Victor Hugo Borja
9cac0ac50a Faster exec times. Load commands only when nedded.
When testing, use `run asdf` to actually test the command
as the user would invoke it, so that we might catch possible
errors on `bin/asdf`.
2019-01-20 02:13:20 -06:00
Melissa Xie
f79dda865a Include plugin name in error message if plugin doesn't exist
Previously, if we ran a command like `asdf install` and we encountered a
plugin that didn't exist, asdf produces an error saying "No such
plugin". Without knowing which plugin it could be referring too, we'd
have to manually go through each plugin in `.tool-versions` to find the
culprit.

With this commit, we'll now also include the plugin name as part of the
messaging for easier debugging.
2018-04-30 12:49:40 -04:00
Trevor Brown
564b9ed517 Fix tests that were failing due to improved error messages. 2017-03-25 15:16:58 -04:00
Victor Borja
d1f0b64c2f Remove shims on uninstall or plugin-remove
- Remove plugin shims when last version is uninstalled.
- Remove shims on plugin-remove

When the latest version of a tool is uninstalled,
Remove the plugin shims (marked with metadata at #122)

Also found lots of missing tests and added them.

Closes #67
2016-12-15 06:05:23 -06:00
Laurens Duijvesteijn
337b335c4d Check if plugin exists before removing it (#77)
Check if plugin exists before removing it
2016-07-06 08:19:15 +09:00