@@ -20,7 +20,6 @@ import Control.Monad.IO.Class (liftIO)
2020import Control.Monad.Reader (MonadIO)
2121import Data.Bifoldable (bifoldr1)
2222import Data.Bifunctor (bimap)
23−import qualified Data.ByteString.UTF8 as BSU
2423import Data.Coerce (coerce)
2524import Data.Default (def)
2625import Data.Either (partitionEithers)
@@ -61,7 +60,6 @@ import System.Environment (getExecutablePath)
6160import System.FilePath
6261import qualified System.Info
6362import System.IO.Temp (withSystemTempDirectory)
64−import Text.ShellEscape (bash, bytes)
6563
6664import Obelisk.App (MonadObelisk)
6765import Obelisk.CliApp (
@@ -78,7 +76,7 @@ import Obelisk.CliApp (
7876 withSpinner,
7977 )
8078import Obelisk.Command.Nix
81−import Obelisk.Command.Project (nixShellWithoutPkgs, withProjectRoot, findProjectAssets)
79+import Obelisk.Command.Project (nixShellWithoutPkgs, withProjectRoot, findProjectAssets, bashEscape)
8280import Obelisk.Command.Thunk (attrCacheFileName)
8381import Obelisk.Command.Utils (findExePath, ghcidExePath)
8482
@@ -466,7 +464,7 @@ runGhciRepl root (toList -> packages) ghciArgs =
466464 -- NOTE: We do *not* want to use $(staticWhich "ghci") here because we need the
467465 -- ghc that is provided by the shell in the user's project.
468466 nixShellWithoutPkgs root True False (packageInfoToNamePathMap packages) "ghc" $
469− Just $ unwords $ fmap (BSU.toString . bytes . bash . BSU.fromString) $ "ghci" : ghciArgs
467+ Just $ unwords $ fmap bashEscape $ "ghci" : ghciArgs
470468
471469-- | Run ghcid
472470runGhcid
@@ -479,7 +477,7 @@ runGhcid
479477 -> m ()
480478runGhcid root chdirToRoot ghciArgs (toList -> packages) mcmd =
481479 nixShellWithoutPkgs root True chdirToRoot (packageInfoToNamePathMap packages) "ghc" $
482− Just $ unwords $ fmap (BSU.toString . bytes . bash . BSU.fromString) $ ghcidExePath : opts
480+ Just $ unwords $ fmap bashEscape $ ghcidExePath : opts
483481 where
484482 opts = concat
485483 [ ["-W"]