Skip to content

Commit

Permalink
fix: Exit success when adding an already-added plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Jul 14, 2023
1 parent d1a563d commit 9896680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/functions/plugins.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ plugin_add_command() {
mkdir -p "$(asdf_data_dir)/plugins"

if [ -d "$plugin_path" ]; then
display_error "Plugin named $plugin_name already added"
exit 2
printf '%s\n' "Plugin named $plugin_name already added" >&2
exit 0
else
asdf_run_hook "pre_asdf_plugin_add" "$plugin_name"
asdf_run_hook "pre_asdf_plugin_add_${plugin_name}"
Expand Down

0 comments on commit 9896680

Please sign in to comment.