Commit 5c70361b authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #2006 from saturday06/read_installed_package_config_as_utf8

Read installed package info file as UTF-8
parents 90811eb4 44a261d4
......@@ -116,7 +116,7 @@ import qualified Distribution.Simple.Setup as Cabal
, testCommand, TestFlags(..), emptyTestFlags )
import Distribution.Simple.Utils
( createDirectoryIfMissingVerbose, rawSystemExit, comparing
, writeFileAtomic, withTempFile , withFileContents )
, writeFileAtomic, withTempFile , withUTF8FileContents )
import Distribution.Simple.InstallDirs as InstallDirs
( PathTemplate, fromPathTemplate, toPathTemplate, substPathTemplate
, initialPathTemplateEnv, installDirsTemplateEnv )
......@@ -1350,7 +1350,7 @@ installUnpackedPackage verbosity buildLimit installLock numJobs
Cabal.regGenPkgConf = toFlag (Just pkgConfFile)
}
setup Cabal.registerCommand registerFlags' mLogPath
withFileContents pkgConfFile $ \pkgConfText ->
withUTF8FileContents pkgConfFile $ \pkgConfText ->
case Installed.parseInstalledPackageInfo pkgConfText of
Installed.ParseFailed perror -> pkgConfParseFailed perror
Installed.ParseOk warns pkgConf -> do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment