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

[Package Issue]: sharkdp.bat #106463

Closed
2 tasks done
fabiano opened this issue May 10, 2023 · 8 comments
Closed
2 tasks done

[Package Issue]: sharkdp.bat #106463

fabiano opened this issue May 10, 2023 · 8 comments
Labels
Help-Wanted This is a good candidate work item from the community. Issue-Bug It either shouldn't be doing this or needs an investigation. Package-Update This package needs to be updated
Milestone

Comments

@fabiano
Copy link

fabiano commented May 10, 2023

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

The environment variable added for the package is wrong. The installer adds to the PATH the folder %LOCALAPPDATA%\Microsoft\WinGet\Packages\sharkdp.bat_Microsoft.Winget.Source_8wekyb3d8bbwe, but the bat.exe is in %LOCALAPPDATA%\Microsoft\WinGet\Packages\sharkdp.bat_Microsoft.Winget.Source_8wekyb3d8bbwe\bat-v0.23.0-x86_64-pc-windows-msvc.

Steps to reproduce

  1. winget install sharkdp.bat
  2. Restart the shell
  3. Run bat

Actual behavior

bat: The term 'bat' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Expected behavior

The .exe file to be in the user path.

Environment

Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2486
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

Screenshots and Logs

No response

@fabiano fabiano added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 10, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label May 10, 2023
@Trenly
Copy link
Contributor

Trenly commented May 10, 2023

Does this occurr when using the latest preview release of winget (v1.5.1081-preview)?

There was a known CLI issue that should be patched in the preview -

@stephengillie stephengillie added Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels May 11, 2023
@mrjcap
Copy link
Contributor

mrjcap commented May 17, 2023

I just tested it. No issue here.

Screenshot:
image

image

@helpimnotdrowning
Copy link

helpimnotdrowning commented May 22, 2023

This issue occurs for a few more packages (for me at least): Gyan.FFmpeg, Gyan.FFmpeg.Shared, and sharkdp.hyperfine. The parent paths are added to the user PATH:
%localappdata%\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe
%localappdata%\Microsoft\WinGet\Packages\sharkdp.hyperfine_Microsoft.Winget.Source_8wekyb3d8bbwe,
but the paths should be Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build-shared\bin for ffmpeg and harkdp.hyperfine_Microsoft.Winget.Source_8wekyb3d8bbwe\hyperfine-v1.16.1-x86_64-pc-windows-msvc for hyperfine. Changing the paths in the PATH to the correct ones fixes the issue.

(I don't exactly know how the winget manifests work and all that, but the three packages seem to all specify the correct files in the Installers.NestedInstallerFiles.RelativeFilePath field(s) in their installer.yaml files)

Using:

  • Windows 11 22H2
  • Winget 1.4.10173
  • Powershell 7.3.4

@mdanish-kh
Copy link
Contributor

@helpimnotdrowning

Using:

Windows 11 22H2
Winget 1.4.10173

Please upgrade to WinGet v1.5.1081-preview where this issue has been resolved

@Trenly
Copy link
Contributor

Trenly commented May 22, 2023

@helpimnotdrowning - Do you see the same issue if you use version 1.5.1081-preview from the releases page?

@helpimnotdrowning
Copy link

helpimnotdrowning commented May 22, 2023

Gyan.FFmpeg installs and works perfectly fine now (after a system restart), but trying to install/uninstall/upgrade hyperfine make winget freeze when it writes "Starting package uninstall..." or "Starting package install...".
image

@fabiano
Copy link
Author

fabiano commented May 24, 2023

@Trenly I forgot to remove the package using v1.4.10173 and when I tried to do it using v1.5.1361-preview the command line froze at this step:

image

Edit:

I reinstalled v1.4.10173 and was able to remove the package. Then, I upgraded to v1.5.1361-preview and installed the package again. The bat.exe was added correctly to the path this time.

@Trenly
Copy link
Contributor

Trenly commented May 24, 2023

I reinstalled v1.4.10173 and was able to remove the package. Then, I upgraded to v1.5.1361-preview and installed the package again. The bat.exe was added correctly to the path this time.

Great! Glad to hear this is resolved in the upcoming version of the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help-Wanted This is a good candidate work item from the community. Issue-Bug It either shouldn't be doing this or needs an investigation. Package-Update This package needs to be updated
Projects
None yet
Development

No branches or pull requests

7 participants