Get a proper working directory
This commit is contained in:
		@@ -7,6 +7,9 @@ import Control.Monad.Buuka
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import Data.Environment
 | 
					import Data.Environment
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import UnliftIO.Directory
 | 
				
			||||||
 | 
					       (XdgDirectory(XdgData), getXdgDirectory)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import qualified Operations
 | 
					import qualified Operations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
commands :: Parser (BuukaM ())
 | 
					commands :: Parser (BuukaM ())
 | 
				
			||||||
@@ -19,5 +22,5 @@ commands = subparser
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
main :: IO ()
 | 
					main :: IO ()
 | 
				
			||||||
main = do
 | 
					main = do
 | 
				
			||||||
  let env = Environment "."
 | 
					  env <- Environment <$> getXdgDirectory XdgData "buuka"
 | 
				
			||||||
  execParser (info (commands <**> helper) fullDesc) >>= runBuukaM env
 | 
					  execParser (info (commands <**> helper) fullDesc) >>= runBuukaM env
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,7 @@ executable buuka
 | 
				
			|||||||
  -- other-extensions:
 | 
					  -- other-extensions:
 | 
				
			||||||
  build-depends:       buuka
 | 
					  build-depends:       buuka
 | 
				
			||||||
                     , optparse-applicative
 | 
					                     , optparse-applicative
 | 
				
			||||||
 | 
					                     , unliftio
 | 
				
			||||||
  hs-source-dirs:      app
 | 
					  hs-source-dirs:      app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
test-suite buuka-test
 | 
					test-suite buuka-test
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@ mkDerivation {
 | 
				
			|||||||
    aeson base bytestring conduit conduit-extra containers exceptions
 | 
					    aeson base bytestring conduit conduit-extra containers exceptions
 | 
				
			||||||
    filepath mtl transformers unliftio yaml
 | 
					    filepath mtl transformers unliftio yaml
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
  executableHaskellDepends = [ base optparse-applicative ];
 | 
					  executableHaskellDepends = [ base optparse-applicative unliftio ];
 | 
				
			||||||
  testHaskellDepends = [
 | 
					  testHaskellDepends = [
 | 
				
			||||||
    aeson base hedgehog hedgehog-corpus tasty tasty-hedgehog text
 | 
					    aeson base hedgehog hedgehog-corpus tasty tasty-hedgehog text
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user