Permalink
Browse files

Fix broken flag handling for 'hackport status'

  • Loading branch information...
1 parent 72143ba commit 9b8eb4b76da50b43579ff8982808aec38346658f @kolmodin kolmodin committed Sep 1, 2008
Showing with 7 additions and 4 deletions.
  1. +7 −4 Main.hs
View
11 Main.hs
@@ -27,6 +27,7 @@ import System.Environment ( getArgs, getProgName )
import System.Exit ( exitFailure )
import System.IO
+import Bash
import qualified Cabal2Ebuild as E
import Cache
import Diff
@@ -285,10 +286,12 @@ statusCommand = CommandUI {
statusAction :: StatusFlags -> [String] -> GlobalFlags -> IO ()
statusAction flags args globalFlags = do
let verbose = fromFlag (statusVerbosity flags)
- portDir = fromFlag (globalPortDir globalFlags)
- overlayPath = fromFlag (globalOverlayPath globalFlags)
- toPortDir = fromFlag (statusToPortage flags)
- runStatus verbose portDir overlayPath toPortDir
+ overlayPathM = flagToMaybe (globalOverlayPath globalFlags)
+ portdirM = flagToMaybe (globalPortDir globalFlags)
+ toPortdir = fromFlag (statusToPortage flags)
+ portdir <- maybe getSystemPortdir return portdirM
+ overlayPath <- maybe (getOverlayPath verbose) return overlayPathM
+ runStatus verbose portdir overlayPath toPortdir
-----------------------------------------------------------------------
-- Merge

0 comments on commit 9b8eb4b

Please sign in to comment.