-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Labels
platform: windowsre: config-fileConcerning the cabal configuration file and the `--config-file` optionConcerning the cabal configuration file and the `--config-file` optiontype: bug
Description
This issue is item 4 from #5204, but I wanted to open a separate issue because it doesn't just affect tests.
When the url field of the repository section of the cabal config file is a file URI, cabal treats its path component as a file path, without applying a conversion:
cabal/cabal-install/Distribution/Client/GlobalFlags.hs
Lines 248 to 249 in 59bb50b
| withRepo _ callback | uriScheme remoteRepoURI == "file:" = do | |
| dir <- Sec.makeAbsolute $ Sec.fromFilePath (uriPath remoteRepoURI) |
On Windows, the path is invalid because it contains forward slashes. If the path is an absolute path, hackage-security's path conversion code ends up removing the colon from the path and preventing cabal from reading root.json. There is more detail in #5204 (comment).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
platform: windowsre: config-fileConcerning the cabal configuration file and the `--config-file` optionConcerning the cabal configuration file and the `--config-file` optiontype: bug