Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c946b7b39b3ee1c856350578bec24c57807c74c4 >--------------------------------------------------------------- commit c946b7b39b3ee1c856350578bec24c57807c74c4 Author: Duncan Coutts <[email protected]> Date: Fri Jan 16 17:59:00 2009 +0000 Only print the config file location for the global --help >--------------------------------------------------------------- cabal-install/Main.hs | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs index e07a9a9..6cd2450 100644 --- a/cabal-install/Main.hs +++ b/cabal-install/Main.hs @@ -80,20 +80,23 @@ mainWorker :: [String] -> IO () mainWorker ("win32selfupgrade":args) = win32SelfUpgradeAction args mainWorker args = case commandsRun globalCommand commands args of - CommandHelp help -> printHelp help + CommandHelp help -> printGlobalHelp help CommandList opts -> printOptionsList opts CommandErrors errs -> printErrors errs CommandReadyToGo (globalflags, commandParse) -> case commandParse of _ | fromFlag (globalVersion globalflags) -> printVersion | fromFlag (globalNumericVersion globalflags) -> printNumericVersion - CommandHelp help -> printHelp help + CommandHelp help -> printCommandHelp help CommandList opts -> printOptionsList opts CommandErrors errs -> printErrors errs CommandReadyToGo action -> action globalflags where - printHelp help = do + printCommandHelp help = do + pname <- getProgName + putStr (help pname) + printGlobalHelp help = do pname <- getProgName configFile <- defaultConfigFile putStr (help pname) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
