Skip to content

Commit

Permalink
Ignore .ghci files while querying project GHC
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Mar 6, 2022
1 parent 852c9a0 commit b145717
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HIE/Bios/Cradle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,10 @@ cabalGhcDirs :: FilePath -> CradleLoadResultT IO (FilePath, FilePath)
cabalGhcDirs workDir = do
libdir <- readProcessWithCwd_ workDir "cabal" ["exec", "-v0", "--", "ghc", "--print-libdir"] ""
exe <- readProcessWithCwd_ workDir "cabal"
["exec", "-v0", "--", "ghc", "-package-env=-", "-e", "do e <- System.Environment.getExecutablePath ; System.IO.putStr e"] ""
[ "exec", "-v0", "--" , "ghc", "-package-env=-", "-ignore-dot-ghci", "-e"
, "do e <- System.Environment.getExecutablePath ; System.IO.putStr e"
]
""
pure (trimEnd exe, trimEnd libdir)

cabalAction :: FilePath -> Maybe String -> LoggingFunction -> FilePath -> CradleLoadResultT IO ComponentOptions
Expand Down
5 changes: 5 additions & 0 deletions tests/projects/simple-cabal/.ghci
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- This file is intentional
--
-- Issue: https://github.com/haskell/hie-bios/issues/336
--
:set +t

0 comments on commit b145717

Please sign in to comment.