volta-cli/volta
View on GitHub`volta list` output is wrong for locally-installed tools
Open
#711 opened on Apr 16, 2020
buggood first issue
Description
In a project with a given tool installed locally (in this case, ember-cli)—
-
Expected:
$ volta list ⚡️ Currently active tools: Node: v12.16.2 (current @ /Users/chris/dev/test/foo/package.json) Yarn: v1.22.4 (current @ /Users/chris/dev/test/foo/package.json) Tool binaries available: ember (current @ /Users/chris/dev/test/foo/package.json) -
Actual:
$ volta list ⚡️ Currently active tools: Node: v12.16.2 (current @ /Users/chris/dev/test/foo/package.json) Yarn: v1.22.4 (current @ /Users/chris/dev/test/foo/package.json) Tool binaries available: ember (default)
Additionally, we currently report the wrong platform values for these. In the extended form (volta list all):
-
Expected:
ember-cli@3.17.0 (current @ /Users/chris/dev/test/foo/package.json) binary tools: ember platform: runtime: node@12.16.2 (current @ /Users/chris/dev/test/foo/package.json) package manager: yarn@1.22.4 (current @ /Users/chris/dev/test/foo/package.json) -
Actual:
ember-cli@3.17.0 (default) binary tools: ember platform: runtime: node@12.16.2 package manager: npm@built-in
This correctly reports the Node version (though without the current @ ... from the design), but not the correct package manager version.
This affects both the --format=plain and the --format=human variants, which is expected: the underlying logic for both is identical.