Skip to content
Snippets Groups Projects
Commit 30c66ab1 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #2822 from edsko/pr/undo-2680

Revert "Exit with an error if $CABAL_SANDBOX_CONFIG does not point to extant file"
parents 95aa78ea 5a93345d
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,6 @@ import Control.Exception ( assert, bracket_ )
import Control.Monad ( forM, liftM2, unless, when )
import Data.Bits ( shiftL, shiftR, xor )
import Data.Char ( ord )
import Data.Foldable ( forM_ )
import Data.IORef ( newIORef, writeIORef, readIORef )
import Data.List ( delete, foldl' )
import Data.Maybe ( fromJust )
......@@ -177,11 +176,7 @@ updateSandboxConfigFileFlag globalFlags =
case globalSandboxConfigFile globalFlags of
Flag _ -> return globalFlags
NoFlag -> do
fp <- lookupEnv "CABAL_SANDBOX_CONFIG"
forM_ fp $ \fp' -> do -- Check for existence if environment variable set
exists <- doesFileExist fp'
unless exists $ die $ "Cabal sandbox file in $CABAL_SANDBOX_CONFIG does not exist: " ++ fp'
let f' = maybe NoFlag Flag fp
f' <- fmap (maybe NoFlag Flag) . lookupEnv $ "CABAL_SANDBOX_CONFIG"
return globalFlags { globalSandboxConfigFile = f' }
-- | Return the path to the sandbox config file - either the default or the one
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment