Get a proper working directory

This commit is contained in:
Mats Rauhala 2020-12-31 08:31:31 +02:00
parent a05a41efe8
commit 213e94c896
3 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,9 @@ import Control.Monad.Buuka
import Data.Environment
import UnliftIO.Directory
(XdgDirectory(XdgData), getXdgDirectory)
import qualified Operations
commands :: Parser (BuukaM ())
@ -19,5 +22,5 @@ commands = subparser
main :: IO ()
main = do
let env = Environment "."
env <- Environment <$> getXdgDirectory XdgData "buuka"
execParser (info (commands <**> helper) fullDesc) >>= runBuukaM env

View File

@ -61,6 +61,7 @@ executable buuka
-- other-extensions:
build-depends: buuka
, optparse-applicative
, unliftio
hs-source-dirs: app
test-suite buuka-test

View File

@ -13,7 +13,7 @@ mkDerivation {
aeson base bytestring conduit conduit-extra containers exceptions
filepath mtl transformers unliftio yaml
];
executableHaskellDepends = [ base optparse-applicative ];
executableHaskellDepends = [ base optparse-applicative unliftio ];
testHaskellDepends = [
aeson base hedgehog hedgehog-corpus tasty tasty-hedgehog text
];