volta-cli/volta

`volta list` output is wrong for locally-installed tools

Open

#711 ouverte le 16 avr. 2020

Voir sur GitHub
 (5 commentaires) (1 réaction) (0 assignés)Rust (189 forks)batch import
buggood first issue

Métriques du dépôt

Stars
 (8 309 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur