Skip to content

Commit

Permalink
New function: loadUserConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
23Skidoo committed Mar 24, 2013
1 parent 0e39469 commit 0c9284f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cabal-install/Distribution/Client/PackageEnvironment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module Distribution.Client.PackageEnvironment (
, showPackageEnvironment
, showPackageEnvironmentWithComments
, setPackageDB
, loadUserConfig

, basePackageEnvironment
, initialPackageEnvironment
Expand Down Expand Up @@ -252,6 +253,11 @@ userPackageEnvironment verbosity pkgEnvDir = do
++ maybe "" (\n -> ":" ++ show n) line ++ ":\n" ++ msg
return mempty

-- | Same as @userPackageEnvironmentFile@, but returns a SavedConfig.
loadUserConfig :: Verbosity -> FilePath -> IO SavedConfig
loadUserConfig verbosity pkgEnvDir = fmap pkgEnvSavedConfig
$ userPackageEnvironment verbosity pkgEnvDir

-- | Try to load the package environment file ("cabal.sandbox.config"), exiting
-- with error if it doesn't exist. Also returns the path to the sandbox
-- directory. Note that the path parameter should be a name of an existing
Expand Down

1 comment on commit 0c9284f

@tibbe
Copy link

@tibbe tibbe commented on 0c9284f Mar 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.