Skip to content

Support for global tools #47

@hohwille

Description

@hohwille

We have implemented a lot of cross-cutting logic for tool installations in ToolCommandlet.
However, we have tools like Docker that behave very differently: Those are tools that get installed globally, that is:

  • You can not have multiple installations of the same tool on the same computer at a time.
  • These tools are NOT installed into IDE_HOME/software but somewhere globally into the system (e.g. C:\ProgramFiles on Windows or /Applications on MacOS).
  • The downloads of such tools will never be extracted (see isExtract() method) and actually installInRepo does not really make sense here.

We should discuss and decide the following design options:

  • Make ToolCommandlet more generic, add a protected method isGlobalInstallation() that returns false by default that can be overridden by global commandlets like docker.
  • Create abstract sub-classes GlobalToolCommandlet and LocalToolCommandlet derived from ToolCommandlet and make all existing ToolCommandlets derive from LocalToolCommandlet. Then move logic like installInRepo method into LocalToolCommandlet and also for some other methods like install(...) but keep an abstract signature for the latter in ToolCommandlet. Then implement the install(...) methods in GlobalToolCommandlet.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions