File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,23 @@ case "$DEFINITION" in
3838 ;;
3939esac
4040
41+ declare -a before_hooks after_hooks
42+
43+ before_uninstall () {
44+ local hook=" $1 "
45+ before_hooks[" ${# before_hooks[@]} " ]=" $hook "
46+ }
47+
48+ after_uninstall () {
49+ local hook=" $1 "
50+ after_hooks[" ${# after_hooks[@]} " ]=" $hook "
51+ }
52+
53+ for script in $( rbenv-hooks uninstall) ; do
54+ source " $script "
55+ done
56+
57+
4158VERSION_NAME=" ${DEFINITION##*/ } "
4259PREFIX=" ${RBENV_ROOT} /versions/${VERSION_NAME} "
4360
@@ -54,7 +71,11 @@ if [ -z "$FORCE" ]; then
5471 esac
5572fi
5673
74+ for hook in " ${before_hooks[@]} " ; do eval " $hook " ; done
75+
5776if [ -d " $PREFIX " ]; then
5877 rm -rf " $PREFIX "
5978 rbenv rehash
6079fi
80+
81+ for hook in " ${after_hooks[@]} " ; do eval " $hook " ; done
You can’t perform that action at this time.
0 commit comments