Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line tools installed via winget not available in CMD.exe #3067

Closed
chexo3 opened this issue Mar 13, 2023 · 7 comments
Closed

Command line tools installed via winget not available in CMD.exe #3067

chexo3 opened this issue Mar 13, 2023 · 7 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package
Milestone

Comments

@chexo3
Copy link

chexo3 commented Mar 13, 2023

Brief description of your issue

Hello! I've attempted to install a few command line tools via winget. Specifically, aria2c, nano, and ffmpeg. None are available in cmd.exe. I checked my PATH, and they do show up there:

C:\Program Files\Ant\apache-ant-1.10.9\bin
C:\Program Files\Maven\apache-maven-3.9.0\bin
C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin
C:\cc65\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\libnvvp
C:\Program Files\dotnet\
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Windows\System32\OpenSSH\
C:\HaxeToolkit\haxe
C:\HaxeToolkit\neko
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\TortoiseGit\bin
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\gs\gs9.56.1\bin
C:\Program Files\PuTTY\
C:\Program Files\Graphviz\bin
C:\Program Files\Git\cmd
C:\Program Files\WireGuard\
C:\Program Files\mpv.net
C:\Users\User\AppData\Local\Microsoft\WindowsApps
C:\Users\User\go\bin
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.4\bin
C:\Users\User\AppData\Local\Microsoft\WindowsApps
C:\Users\User\AppData\Local\Programs\MiKTeX\miktex\bin\x64\
C:\Users\User\AppData\Local\spicetify
C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe
C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\GNU.Nano_Microsoft.Winget.Source_8wekyb3d8bbwe
C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe
C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\aria2.aria2_Microsoft.Winget.Source_8wekyb3d8bbwe

Steps to reproduce

I'm not sure. I just installed these tools and noticed they didn't work, then went looking in my PATH.

Expected behavior

I expected the tools on my PATH to be found by CMD.exe so I could use them.

Actual behavior

Despite appearing on my PATH, CMD.exe can't find them. This is really confusing, I have no idea how this could have happened.

Environment

Windows Package Manager v1.4.10173                                                                                                                                                                                                                                           Copyright (c) Microsoft Corporation. All rights reserved.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Windows: Windows.Desktop v10.0.19043.2364                                                                                                                                                                                                                                    System Architecture: X64                                                                                                                                                                                                                                                     Package: Microsoft.DesktopAppInstaller v1.19.10173.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir                                                                                                                                                                                                                                                                                                                                                                                                                                                        User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json                                                                                                                                                                                                                                                                                                                                                                                                                                               Links                                                                                                                                                                                                                                                                        ---------------------------------------------------------------------------                                                                                                                                                                                                  Privacy Statement   https://aka.ms/winget-privacy                                                                                                                                                                                                                            License Agreement   https://aka.ms/winget-license                                                                                                                                                                                                                            Third Party Notices https://aka.ms/winget-3rdPartyNotice                                                                                                                                                                                                                     Homepage            https://aka.ms/winget                                                                                                                                                                                                                                    Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

I previously installed these tools via scoop but have since uninstalled scoop and switched to winget. I removed the scoop entries from my user path.
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Mar 13, 2023
@Masamune3210
Copy link

Make sure you restart cmd, it only picks up the environment on process start, so if parts of it, like the path, change afterwards, it's not going to know anything about it otherwise

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package and removed Needs-Triage Issue need to be triaged labels Mar 13, 2023
@chexo3
Copy link
Author

chexo3 commented Mar 13, 2023

Sorry, I should have clarified. I opened a new window and this happened. I already know to open a new terminal window.

@chexo3
Copy link
Author

chexo3 commented Mar 17, 2023

@denelon You've improperly marked that issue as a duplicate of this one. It would be useful, yes, to have the environment updated right away to avoid having to restart the terminal, but I have restarted the terminal and these tools are seemingly on my path, yet Windows cmd.exe won't let me use them regardless.

This is not an issue with me forgetting to restart command. I'm sorry, I should have clarified that at the beginning.

@jonasestevam
Copy link

jonasestevam commented Mar 25, 2023

it happened to me after installing ffmpeg with "winget install ffmpeg"

Editing the PATH
from
"C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe"

to
"C:\Users\Jonas\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build\bin"

worked for me

@Masamune3210
Copy link

Something tells me that the portable manifest might need to have some way to declare where the binaries are stored in the package, since they can have their own folder structure that isn't exactly the most standardized

@mdanish-kh
Copy link
Contributor

mdanish-kh commented Mar 25, 2023

Duplicate of #2909

The fix is implemented in a PR and will ship in the next preview release of WinGet

@mdanish-kh
Copy link
Contributor

The fix (PR #3002) has made its way into WinGet v1.5.1081-preview release

cc @denelon

@denelon denelon closed this as completed May 1, 2023
@denelon denelon added this to the v1.5-Client milestone Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package
Projects
None yet
Development

No branches or pull requests

5 participants