Skip to content

Commit

Permalink
Merge pull request #657 from jcpetruzza/stack-ide-bin-path
Browse files Browse the repository at this point in the history
Make stack-ide receive a path where the correct ide-backend-server is installed
  • Loading branch information
mgsloan committed Jul 22, 2015
2 parents ba5bc52 + 055d159 commit 2af3d1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Stack/Ide.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@ ide targets useropts = do
else return Nothing
localdb <- packageDatabaseLocal
depsdb <- packageDatabaseDeps
bindirs <- extraBinDirs `ap` return True {- include local bin -}
let pkgopts = concat (map _2 pkgs)
srcfiles = concatMap (map toFilePath . _3) pkgs
pkgdbs =
["--package-db=" <> toFilePath depsdb <> ":" <> toFilePath localdb]
paths =
["--ide-backend-tools-path=" <> intercalate ":" (map toFilePath bindirs)
]
exec
"stack-ide"
(["--local-work-dir=" ++ toFilePath pwd] ++
map ("--ghc-option=" ++) (filter (not . badForGhci) useropts) <>
paths <>
pkgopts <>
pkgdbs)
(encode (initialRequest srcfiles))
Expand Down

0 comments on commit 2af3d1b

Please sign in to comment.