Skip to content

fix(current): command reads wrong version on Windows #135

@CalvinAllen

Description

@CalvinAllen

Summary

The current command shows an incorrect version on Windows. After setting global to 20.18.0, it displays 22.0.0 as the configured version.

Steps to Reproduce

  1. Install Node.js 20.18.0 and 22.11.0
  2. Run dtvem global node 20.18.0
  3. Run dtvem current node

Expected Behavior

Should show Node.js 20.18.0 as the current version.

Actual Behavior

Shows Node.js 22.0.0 (not even an installed version) and prompts to install it:

╭────────────────────────────────────╮
│ Runtime  Version  Status           │
│ Node.js  22.0.0    not installed   │
╰────────────────────────────────────╯
Install Node.js 22.0.0 now? [Y/n]:

Environment

  • Platform: Windows (windows-latest GitHub Actions runner)
  • Versions installed: 20.18.0, 22.11.0
  • Global version set: 20.18.0

Evidence

From GitHub Actions run 20199639084:

✓ Successfully set global Node.js version to 20.18.0
...
Current node version: ╭────────────────────────────────────╮
│ Runtime  Version  Status           │
│ Node.js  22.0.0    not installed   │
╰────────────────────────────────────╯
ERROR: Expected 20.18.0 but got ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions