Skip to content

Cannot install on windows11[bug] #1201

Open

Description

@FuRuF-11
Image

As you can see, I use the cmd you provided to install pkgx, but fail.

Then I simple run the cmd irm https://pkgx.sh > pkgx.sh to see what happen. And here is the code in pkgx.sh

Image

Somehow, the download link redirects to the webpage where the GitHub repository is located.

I guess this is a bug. Please fix it.

Activity

  1. jhheider commented on Aug 29, 2025

    @jhheider
    Contributor

    Looks like the code which detects the cli invocation isn't working. So, I likely need to know what user-agent irm is supplying on win11.

    In the meantime, you can skip the "easy" redirect, and get the installer script directly:

    PS > irm https://github.com/pkgxdev/setup/blob/main/installer.ps1 | iex
  2. jhheider commented on Aug 29, 2025

    @jhheider
    Contributor

    Specifically, the pre-routing does this:

    var ua = request.headers['user-agent'] ? request.headers['user-agent'].value : '';
    ...
        } else if (/\sWindowsPowerShell\//.test(ua) && (newhost || host) == "pkgx.sh") {
            request.uri = "/installer.ps1";

    so, it's possible irm isn't including WindowsPowerShell in its user-agent value.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions