@@ -107,7 +107,8 @@ main = do
107107 files <- find always (extension ==? goSrc) currentDir
108108 let fileDirs = nub $ joinPath . init <$> filter isSrc (getDir <$> files)
109109 currentEnv <- getEnvironment
110− let searchPath = intercalate [searchPathSeparator] fileDirs
110+ let pathDirs = maybe id (:) (lookup "GOPATH" currentEnv) $ fileDirs
111+ searchPath = intercalate [searchPathSeparator] pathDirs
111112 env = ("GOPATH", searchPath) : currentEnv
112113 (_, _, _, p) <- createProcess (proc "go" [command, "Main"]){ env = Just env }
113114 waitForProcess p