1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/app/Commands/Clean.hs

14 lines
440 B
Haskell
Raw Normal View History

module Commands.Clean where
import Commands.Base
import Commands.Clean.Options
runCommand :: (Members '[Files, App] r) => CleanOptions -> Sem r ()
runCommand opts
| opts ^. cleanOptionsGlobal = do
configDir <- juvixConfigDir
whenM (directoryExists' configDir) (removeDirectoryRecursive' configDir)
| otherwise = do
buildDir <- askBuildDir
whenM (directoryExists' buildDir) (removeDirectoryRecursive' buildDir)