Skip to content

Commit

Permalink
Canonicalize path to Cabal file, partially towards haskell#2994.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>
  • Loading branch information
ezyang committed Dec 28, 2015
1 parent 22b6aad commit f907f1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Cabal/Distribution/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ import Distribution.Text
-- Base
import System.Environment(getArgs, getProgName)
import System.Directory(removeFile, doesFileExist,
doesDirectoryExist, removeDirectoryRecursive)
doesDirectoryExist, removeDirectoryRecursive,
canonicalizePath)
import System.Exit (exitWith,ExitCode(..))
import System.FilePath(searchPathSeparator)
import Distribution.Compat.Environment (getEnvironment)
Expand Down Expand Up @@ -232,7 +233,8 @@ configureAction hooks flags args = do
case mdescr of
Just descr -> return (Nothing, descr)
Nothing -> do
pdfile <- defaultPackageDesc verbosity
pdfile0 <- defaultPackageDesc verbosity
pdfile <- canonicalizePath pdfile0
descr <- readPackageDescription verbosity pdfile
return (Just pdfile, descr)

Expand Down

0 comments on commit f907f1a

Please sign in to comment.