sim command fixes
This commit is contained in:
parent
52891711d2
commit
2cbd3fb26b
1 changed files with 7 additions and 5 deletions
|
@ -27,8 +27,9 @@ seek :: CmdParams -> CommandSeek
|
|||
seek ("start":[]) = start Nothing
|
||||
seek ("start":simfile:[]) = start (Just simfile)
|
||||
seek ("end":[]) = do
|
||||
simdir <- fromRepo gitAnnexSimDir
|
||||
liftIO $ removeDirectoryRecursive $ fromRawFilePath simdir
|
||||
simdir <- fromRawFilePath <$> fromRepo gitAnnexSimDir
|
||||
whenM (liftIO $ doesDirectoryExist simdir) $ do
|
||||
liftIO $ removeDirectoryRecursive simdir
|
||||
seek ("visit":reponame:[]) = do
|
||||
simdir <- fromRepo gitAnnexSimDir
|
||||
liftIO (restoreSim simdir) >>= \case
|
||||
|
@ -76,7 +77,8 @@ start simfile = do
|
|||
{ simFile = Just simlogfile }
|
||||
case simfile of
|
||||
Nothing -> startup simdir st []
|
||||
Just f -> case parseSimFile f of
|
||||
Just f -> liftIO (readFile f) >>= \c ->
|
||||
case parseSimFile c of
|
||||
Left err -> giveup err
|
||||
Right cs -> startup simdir st cs
|
||||
showLongNote $ UnquotedString "Sim started, logging to sim file "
|
||||
|
|
Loading…
Reference in a new issue