microsoft / microsoft/winget-pkgs

[Package Issue]: Arm.GnuArmEmbeddedToolchain

Open
#123,489 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
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
  1. Back up your user-scope PATH variable:
    $pathobj = gp -Path HKCU:\Environment -Name Path
    Export-Clixml "$env:USERPROFILE\path.xml" -InputObject $pathobj
    
  2. Ensure the user-scope PATH is 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;...
    # ...
    
  3. Install Arm.GnuArmEmbeddedToolchain:
    winget install --id Arm.GnuArmEmbeddedToolchain
    
  4. Check that the user-scope PATH now only contains C:\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;
    # ...
    
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.