microsoft / microsoft/winget-pkgs
[Package Issue]: Arm.GnuArmEmbeddedToolchain
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Please confirm these before moving forward
- I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue
Installation issue.
Brief description of your issue
Installing the Arm.GnuArmEmbeddedToolchain package destroys the user's persistent PATH variable.
After installing the Arm.GnuArmEmbeddedToolchain package by executing winget install --id Arm.GnuArmEmbeddedToolchain, the entirety of the current user's persistent PATH variable is replaced with C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin; previous modifications to the variable are lost. In particular, apps such as Visual Studio Code, Python (Windows Store distribution), as well as other user-scope WinGet apps linked under %LOCALAPPDATA%\Microsoft\WinGet\Links, will become inaccessible by their executable file names until the user manually add them back to PATH.
Since this is the program installer's misbehavior, this should ideally be reported to the vendor of this program; however, we have no control over if and when they'll fix this problem, and in the mean time it may be better for WinGet to work around it.
Steps to reproduce
- Back up your user-scope
PATHvariable:$pathobj = gp -Path HKCU:\Environment -Name Path Export-Clixml "$env:USERPROFILE\path.xml" -InputObject $pathobj - Ensure the user-scope
PATHis not empty. For example, add some random stuff to it:$pathobj.Path = "C:\Foo\Bar;" + $pathobj.Path sp -Path HKCU:\Environment -Name Path -Value $pathobj gp -Path HKCU:\Environment -Name Path # Path: C:\Foo\Bar;... # ... - Install
Arm.GnuArmEmbeddedToolchain:winget install --id Arm.GnuArmEmbeddedToolchain - Check that the user-scope
PATHnow only containsC:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin:gp -Path HKCU:\Environment -Name Path # Path: C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin; # ... - Restore
PATH:Import-Clixml "$env:USERPROFILE\path.xml" | sp -Path HKCU:\Environment -Name Path
Actual behavior
Installing Arm.GnuArmEmbeddedToolchain destroys the user's PATH.
Expected behavior
Installing Arm.GnuArmEmbeddedToolchain should merely add to either the system's or the user's PATH; existing contents should be preserved.
Environment
Windows Package Manager (Preview) v1.7.2782-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.25967.1010
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.2782.0
Screenshots and Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the Arm.GnuArmEmbeddedToolchain package entry in this repository and reproduce the installation using the provided PowerShell commands. Check how the package installation handles the user PATH; done means installing it preserves existing PATH entries while adding the toolchain path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100