-
Notifications
You must be signed in to change notification settings - Fork 91
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
Running custom bindist's shim requires elevated permissions on Windows #1149
Comments
This is not proof that there's something wrong with the shim. Can you run |
Yes I can: ~
➜ /c/ghcup/ghc/9.6.6-patched/bin/ghc.exe
ghc-9.6.6.exe: no input files
Usage: For basic information, try the `--help' option. |
Is antivirus off? |
Yes, it is off. |
I could not reproduce the issue, I tried with zsh too. I installed the official https://downloads.haskell.org/~ghc/9.6.6/ghc-9.6.6-x86_64-unknown-mingw32.tar.xz with the name "ghc-9.6.6-patched" for testing |
Surprisingly that works for me too.
Now I'm quite puzzled on what is going on with the 9.6.6-patched shim. I don't really understand what is going on here, check this:
|
Ok I think I have an answer and it is not what I was expecting:
And my ghc has
I guess this can close the issue as mystery solved. The issue is with the name of the file making it being considered an installer. |
If we have a more or less comprehensive list of these suffixes/filenames, I think it does make sense on windows to emit a post-install warning (or even pre-install with a 10s sleep timer) about this issue. |
This only mentions "install", "setup" and "update", now we know also about "patch". |
I have a GHC 9.6.6 with some patches on top that I use daily, named
9.6.6-patched
in GHCup.This GHC was installed via
hadrian binary-dist
, thenghcup install ghc -u file:///<path-to-bindist> 9.6.6-patched
.I can run it from the
ghc.exe
shim:➜ /c/ghcup/bin/ghc.exe ghc-9.6.6.exe: no input files Usage: For basic information, try the `--help' option.
The shim file for this one and
ghc-9.6.6-patched.exe
are the same, and the executables are the same (viadiff
):However, running the
ghc-9.6.6-patched.exe
executable results in a permission error unless we are in an elevated shell:I found this out via the following error when compiling HLS for this GHC:
Note this succeeds in an elevated shell:
The text was updated successfully, but these errors were encountered: