Skip to content

Using WinGet to install package from Windows Terminal in Non-Admin mode causes Command-line alias creation to silently fail #3436

Closed

Description

@philip-young

Brief description of your issue

I tried to install mkcert from winget using the Windows Terminal in non-Admin mode. It seems that even though the package was created successfully, the line indicating that a command line alias was created didn't work. I double checked my PATH environment variable and that correctly was created and pointed to the path of where the package was installed, but when I tried to run the package using the alias 'mkcert' I got an error indicating it couldn't be found.

Eventually I tried running Windows Terminal in Administrator mode and reinstalled the package and it worked.

image

Steps to reproduce

In Windows Terminal (non Admin):
winget install mkcert
Install successful and command line alias added.
Restart Terminal to load new environment variables.

mkcert

(error not found)

Expected behavior

using the mkcert alias from the command line works successfully.

Actual behavior

the newly installed package is not found when using the alias, but when using the package name mkcert-xxx-windows-amd64.exe it is found.

Environment

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

Windows: Windows.Desktop v10.0.22621.1848
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1572.0

Activity

  1. mdanish-kh commented on Jul 14, 2023

    @mdanish-kh
    Contributor

    This is because the exe full name is mkcert-v1.4.4-windows-amd64.exe and looks like WinGet doesn't rename portables in non-symlinked installations. Not sure if this bug is being tracked separately here in the CLI.

    Similar case to microsoft/winget-pkgs#111454

    [Policy] Portable

  2. added
    Portable
    on Jul 14, 2023
  3. mdanish-kh commented on Jul 14, 2023

    @mdanish-kh
    Contributor

    I'll mark this as duplicate of the newly created issue for better tracking of the underlying issue

    Duplicate of #3437

  4. microsoft-github-policy-service commented on Jul 14, 2023

    @microsoft-github-policy-service
    Contributor

    Hello philip-young,

    We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution!

    Template: msftbot/duplicate/closed

  5. added
    Resolution-Duplicate
    and removed
    Needs-Triage
    on Jul 14, 2023
  6. microsoft-github-policy-service commented on Jul 14, 2023

    @microsoft-github-policy-service
    Contributor

    Hello philip-young,

    We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution!

    Template: msftbot/duplicate/closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PortableResolution-Duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions