[commit: packages/Cabal] ghc-head: 'checkSandboxConfigNewer': Check that the sandbox config exists. (1483def)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:27:18 CEST 2013


Repository : ssh://git@git.haskell.org/Cabal

On branch  : ghc-head
Link       : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=1483def5f613b5685bc6a5d24a845c6c4541fa24

>---------------------------------------------------------------

commit 1483def5f613b5685bc6a5d24a845c6c4541fa24
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Mon Jun 10 03:00:58 2013 +0200

    'checkSandboxConfigNewer': Check that the sandbox config exists.


>---------------------------------------------------------------

1483def5f613b5685bc6a5d24a845c6c4541fa24
 cabal-install/Main.hs |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs
index d51806c..5c9fd69 100644
--- a/cabal-install/Main.hs
+++ b/cabal-install/Main.hs
@@ -421,7 +421,10 @@ reconfigure verbosity distPref     addConfigFlags extraArgs globalFlags
     checkSandboxConfigNewer = do
       sandboxConfig  <- getSandboxConfigFilePath globalFlags
       let buildConfig = localBuildInfoFile distPref
-      sandboxConfig `moreRecentFile` buildConfig
+      sandboxConfigExists <- doesFileExist sandboxConfig
+      if sandboxConfigExists
+        then sandboxConfig `moreRecentFile` buildConfig
+        else return False
 
     -- Determine what message, if any, to display to the user if reconfiguration
     -- is required.





More information about the ghc-commits mailing list