diff --git a/codex.cabal b/codex.cabal
--- a/codex.cabal
+++ b/codex.cabal
@@ -1,5 +1,5 @@
 name:                codex
-version:             0.4.0.4
+version:             0.4.0.6
 synopsis:            A ctags file generator for cabal project dependencies.
 description:
   This tool download and cache the source code of packages in your local hackage,
@@ -77,7 +77,7 @@
     , transformers
     , wreq
     , yaml                
-    , codex               == 0.4.0.4
+    , codex               == 0.4.0.6
 
 source-repository head
   type:     git
diff --git a/codex/Main.hs b/codex/Main.hs
--- a/codex/Main.hs
+++ b/codex/Main.hs
@@ -143,6 +143,8 @@
                         case ec of
                           ExitSuccess -> do
                             globalPath <- readStackPath "global-stack-root"
+                            binPath <- readStackPath "bin-path"
+                            setEnv "PATH" binPath
                             return (Stack, cx' { hackagePath = globalPath </> "indices" </> "Hackage" })
                           _           ->
                             return (Cabal, cx')
