devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
7 stars 18 forks source link

Handle uninstall of global tool commandlets #399

Open slskiba opened 2 weeks ago

slskiba commented 2 weeks ago

Currently the uninstall commandlet only implements a solution for local tool commandlets. Global commandlets, such as docker, are not successfully uninstalled after running ide uninstall <tool>.

As per the change implemented in #397, GlobalToolCommandlet implements its own uninstall method (see here), simply providing a generic error that the tool could not be uninstalled:

  @Override
  public void uninstall() {
    //TODO: handle "uninstall <globaltool>"
    this.context.error("Couldn't uninstall " + this.getName());
  }

Global tools should implement uninstall procedures if possible. However in cases where uninstallation by IDEasy is not possible, we should provide the user with productive output, for example manual uninstall instructions. Currently, only the generic error is being displayed.