You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As far as I can tell, the recommended way to update cabal-install is:
$ cabal update
$ cabal install cabal-install
However, this fails on Windows due to that platform's restrictions on deleting running executables:
To Reproduce
Steps to reproduce the behavior:
$ cabal v2-install cabal-install --overwrite-policy=always
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.7.0.0 supports
'ghc' version < 9.4):
C:\msys64\home\ben\ghc-9.4.4-x86_64-unknown-mingw32\bin\ghc.exe is version
9.4.4
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.7.0.0 supports
'ghc' version < 9.4):
C:\msys64\home\ben\ghc-9.4.4-x86_64-unknown-mingw32\bin\ghc.exe is version
9.4.4
Resolving dependencies...
Up to date
Copying 'cabal.exe' to 'C:\Users\ben\AppData\Roaming\cabal\bin\cabal.exe'
C:\Users\ben\AppData\Roaming\cabal\bin\cabal.exe: DeleteFile "\\\\?\\C:\\Users\\ben\\AppData\\Roaming\\cabal\\bin\\cabal.exe": permission denied (Access is denied.)
Expected behavior
A new cabal-install is installed.
System information
Any Windows
Any cabal-install and ghc release
Additional context
It's a bit unclear how best to handle this. Perhaps cabal-install should gain a cabal upgrade command, which works around this limitation by first moving the old executable out of the way?
The text was updated successfully, but these errors were encountered:
thanks for reporting it, I have hit it for years
my workaround (the trivial one) is set install-dir to an alternative location and replace the executable by hand
but yeah it should work out if the box and a very least add a note to install instructions
Describe the bug
As far as I can tell, the recommended way to update
cabal-install
is:However, this fails on Windows due to that platform's restrictions on deleting running executables:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A new
cabal-install
is installed.System information
cabal-install
andghc
releaseAdditional context
It's a bit unclear how best to handle this. Perhaps
cabal-install
should gain acabal upgrade
command, which works around this limitation by first moving the old executable out of the way?The text was updated successfully, but these errors were encountered: