ENH add option to only test the dependency tree and spit out results

This commit is contained in:
Nathan Dwarshuis 2022-12-26 09:15:49 -05:00
parent 334816ce47
commit 48722f79a4
2 changed files with 5 additions and 0 deletions

View File

@ -11,6 +11,8 @@ module Main (main) where
-- * Theme integration with xmonad (shared module imported below) -- * Theme integration with xmonad (shared module imported below)
-- * A custom Locks plugin from my own forked repo -- * A custom Locks plugin from my own forked repo
import Control.Monad
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.List import Data.List
@ -52,6 +54,7 @@ main = getArgs >>= parse
parse :: [String] -> IO () parse :: [String] -> IO ()
parse [] = run parse [] = run
parse ["--deps"] = withCache printDeps parse ["--deps"] = withCache printDeps
parse ["--test"] = void $ withCache . evalConfig =<< connectDBus
parse _ = usage parse _ = usage
run :: IO () run :: IO ()

View File

@ -71,8 +71,10 @@ main = getArgs >>= parse
parse :: [String] -> IO () parse :: [String] -> IO ()
parse [] = run parse [] = run
parse ["--deps"] = withCache printDeps parse ["--deps"] = withCache printDeps
parse ["--test"] = void $ withCache . evalConf =<< connectDBusX
parse _ = usage parse _ = usage
run :: IO () run :: IO ()
run = do run = do
db <- connectDBusX db <- connectDBusX