Skip to content

[BUG]: For versions 0.9.1 and 0.9.2, vfox use --global does not work on Windows #583

Closed

Description

@linghengqian

Version
The version you are currently using

  • 0.9.1 and 0.9.2

OS
macOS、Linux、Windows

  • Windows

Describe the bug
A clear and concise description of what the bug is.

  • For versions 0.9.1 and 0.9.2, vfox use --global does not work on Windows.
  • It's difficult to say I know how to reproduce this in GitHub Actions Runner, because I haven't actually tested installing Vfox in a Windows Server 2025 environment without a GUI. The following commands were tested within a Windows Sandbox on Windows 11 Pro.
# Open a new Windows PowerShell 5.1 terminal with administrator privileges
Install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Repair-WinGetPackageManager -AllUsers
winget install --id Microsoft.Powershell --source winget

# Open a new PowerShell 7 terminal
winget install --id version-fox.vfox --source winget --exact --version 0.9.2
if (-not (Test-Path -Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }; Add-Content -Path $PROFILE -Value 'Invoke-Expression "$(vfox activate pwsh)"'

# Open a new PowerShell 7 terminal again
vfox add java
vfox install java@25.0.1-ms java@21.0.9-ms
vfox use --global java@25.0.1-ms

# Open a new PowerShell 7 terminal again
vfox use --global java@25.0.1-ms
vfox use --global java@21.0.9-ms
java -version
  • At this point, the result of java -version is irrelevant to vfox use --global [email protected]. I have to open a new PowerShell 7 terminal to apply the changes made by vfox use --global [email protected].
PowerShell 7.5.4
PS C:\Users\WDAGUtilityAccount> vfox use --global java@25.0.1-ms
Now using java@25.0.1-ms.
PS C:\Users\WDAGUtilityAccount> vfox use --global java@21.0.9-ms
Now using java@21.0.9-ms.
PS C:\Users\WDAGUtilityAccount> java -version
openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Microsoft-12574223 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-12574223 (build 25.0.1+8-LTS, mixed mode, sharing)
  • Both versions 0.9.2 and 0.9.1 contain this bug. The only way to avoid this bug is to install version 0.8.0, specifically: winget install --id version-fox.vfox --source winget --exact --version 0.8.0

Screenshots[optional]
If applicable, add screenshots to help explain your problem.

  • Image

Activity

  1. added
    bug
    on Dec 25, 2025
  2. linghengqian commented on Dec 25, 2025

    @linghengqian
    MemberAuthor

    Well, I have to assume that Copilot's conclusion is correct......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions