on master help sign in
Merge pull request #636 from obsidiansystems/eac@fix-more-ob-run-stuff

Fix more ob run stuff...

commitf59c657bfffb6c95f4b8419c7fdb93cd9e22ba60 authorElliot Cameron <3noch@users.noreply.github.com> dateThu 30 Jan 2020, 23:27 (7 years ago) parent0bc03745eb79fa
2 files changed+7−5
lib/command/src/Obelisk/Command/Run.hs+7−2 skeleton/backend/src/Backend.hs−3
lib/command/src/Obelisk/Command/Run.hs+7−2
@@ -315,11 +315,16 @@ runGhcid root chdirToRoot dotGhci packages mcmd =
315315 opts =
316316 [ "-W"
317317 , "--command='ghci -ignore-dot-ghci " <> makeBaseGhciOptions dotGhci <> "' "
318− , "--reload=config"
319318 , "--outputfile=ghcid-output.txt"
320− ] <> testCmd
319+ ] <> map (\x -> "--reload='" <> x <> "'") reloadFiles
320+ <> map (\x -> "--restart='" <> x <> "'") restartFiles
321+ <> testCmd
321322 testCmd = maybeToList (flip fmap mcmd $ \cmd -> "--test='" <> cmd <> "'") -- TODO: Shell escape
322323
324+ adjustRoot x = if chdirToRoot then makeRelative root x else x
325+ reloadFiles = map adjustRoot [root </> "config"]
326+ restartFiles = map (adjustRoot . _cabalPackageInfo_packageFile) packages
327+
323328makeBaseGhciOptions :: FilePath -> String
324329makeBaseGhciOptions dotGhci =
325330 unwords
skeleton/backend/src/Backend.hs−3
@@ -1,6 +1,3 @@
1−{-# LANGUAGE FlexibleContexts #-}
2−{-# LANGUAGE RankNTypes #-}
3−{-# LANGUAGE TypeFamilies #-}
41module Backend where
52
63import Common.Route