-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Issue-FeatureThis is a feature request for the Windows Package Manager client.This is a feature request for the Windows Package Manager client.
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)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-FeatureThis is a feature request for the Windows Package Manager client.This is a feature request for the Windows Package Manager client.