microsoft / microsoft/winget-cli

save winget curl to user/system PATH

Open
#6,106 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Right now, when you upgrade curl for windows through winget (id is cURL.cURL), you have to every time replace the PATH variable on the environment variables to contain the new directory name. For example, if you upgraded from curl 8.18 to 8.19, so the directory where curl.exe will be saved, will be named slightly different due to the version change. So my idea is to automate this during the installation of curl, but this can apply also to other packages as well that the user would like to be saved to his PATH variable (like openssl, ruby, php etc.), instead of doing it manually.

Proposed technical implementation details

An example to a powershell script snippet I wrote that for now do this job for me every time I upgrade curl:

$Old_CURL_Path = ($env:PATH -split ';' | Select-String -Pattern "cURL.cURL").ToString()
$New_CURL_Path = (Get-ChildItem -Path "C:\Users\myusername\AppData" -Filter "curl.exe" -Recurse).DirectoryName
[System.Environment]::SetEnvironmentVariable("PATH", ($env:PATH).Replace($Old_CURL_Path,$New_CURL_Path), [System.EnvironmentVariableTarget]::Machine)
}

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

The issue identifies the WinGet CLI as the relevant area but names no source files, tests, or entry points. Start by tracing how package installation and upgrades handle installed paths and environment variables, then determine how a package could opt into PATH management safely. Done means upgrades can keep the selected package executable available on the user or system PATH without manual version-path replacement, with coverage for curl and the broader package case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.