asdf/lib/commands/plugin-remove.sh

13 lines
331 B
Bash
Raw Normal View History

2015-05-17 11:20:51 -07:00
plugin_remove_command() {
local plugin_name=$1
2017-09-04 10:04:56 -07:00
check_if_plugin_exists "$plugin_name"
2017-09-04 10:04:56 -07:00
local plugin_path
plugin_path=$(get_plugin_path "$plugin_name")
2015-05-17 11:20:51 -07:00
2017-09-04 10:04:56 -07:00
rm -rf "$plugin_path"
rm -rf "$(asdf_data_dir)/installs/${plugin_name}"
grep -l "asdf-plugin: ${plugin_name}" "$(asdf_data_dir)"/shims/* 2>/dev/null | xargs rm -f
2015-05-17 11:20:51 -07:00
}