Task summary
Follow-up to #2306. With that refactoring GlobalToolCommandlet.computeInstalledEditionAndVersion() resolves an EditionAndVersion per OS. For the Linux native package manager case (see #2250 / #2258) only the version is determined by getNativePackageVersion(); as a pragmatic fix in #2306 the edition is set to the tool name (new EditionAndVersion(this.tool, version)).
So what is needed?
Come up with a consistent solution so the edition is determined properly as well:
- Linux /
NativePackage: extend the NativePackage concept so that the native package lookup also yields an edition, and refactor getNativePackageVersion() to return EditionAndVersion (e.g. getNativePackageEditionAndVersion()).
- Windows: the existing concept already supports multiple editions via the
getWindowsRegistryAppNames() map (edition name -> registry app name), so we need to align the other OSes with this model.
- macOS: the in-progress macOS PR should support the same concept, so that with this story all OS paths finally come together.
In the end:
computeInstalledEditionAndVersion() in GlobalToolCommandlet returns a meaningful edition on all OSes (instead of the this.tool placeholder), using one consistent edition-resolution model.
Additional context
No response
Task summary
Follow-up to #2306. With that refactoring
GlobalToolCommandlet.computeInstalledEditionAndVersion()resolves anEditionAndVersionper OS. For the Linux native package manager case (see #2250 / #2258) only the version is determined bygetNativePackageVersion(); as a pragmatic fix in #2306 the edition is set to the tool name (new EditionAndVersion(this.tool, version)).So what is needed?
Come up with a consistent solution so the edition is determined properly as well:
NativePackage: extend theNativePackageconcept so that the native package lookup also yields an edition, and refactorgetNativePackageVersion()to returnEditionAndVersion(e.g.getNativePackageEditionAndVersion()).getWindowsRegistryAppNames()map (edition name -> registry app name), so we need to align the other OSes with this model.In the end:
computeInstalledEditionAndVersion()inGlobalToolCommandletreturns a meaningful edition on all OSes (instead of thethis.toolplaceholder), using one consistent edition-resolution model.Additional context
No response