[commit: packages/Cabal] ghc-head: Only pass executable name from run to build (fb31d41)

git at git.haskell.org git
Fri Oct 11 20:33:00 UTC 2013


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

On branch  : ghc-head
Link       : http://git.haskell.org/packages/Cabal.git/commitdiff/fb31d41873e28f3d35c2e1456e3a421cb3207419

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

commit fb31d41873e28f3d35c2e1456e3a421cb3207419
Author: Johan Tibell <johan.tibell at gmail.com>
Date:   Thu Sep 12 10:22:09 2013 -0700

    Only pass executable name from run to build
    
    run allows for other arguments than the executable name i.e. arguments
    to pass to the executable when we run it. We need to filter these out
    from the extraArgs we pass to build.
    (cherry picked from commit 9092b59a045485c164d1b758601d0422aa18f70f)


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

fb31d41873e28f3d35c2e1456e3a421cb3207419
 cabal-install/Main.hs |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs
index 70551b9..689570f 100644
--- a/cabal-install/Main.hs
+++ b/cabal-install/Main.hs
@@ -813,8 +813,9 @@ runAction (buildFlags, buildExFlags) extraArgs globalFlags = do
                 globalFlags noAddSource (buildNumJobs buildExFlags)
                 (const Nothing)
 
+  let components = takeWhile (/= "--") extraArgs
   maybeWithSandboxDirOnSearchPath useSandbox $
-    build verbosity distPref mempty extraArgs
+    build verbosity distPref mempty components
 
   maybeWithSandboxDirOnSearchPath useSandbox $
     run verbosity buildFlags extraArgs




More information about the ghc-commits mailing list