Closed
Description
The generated PkgInfo
modules check for the revision control system with the following code.
getVCS :: IO (Maybe RepoType)
getVCS =
doesDirectoryExist ".hg" >>= \x0 -> if x0
then return (Just Mercurial)
else doesDirectoryExist ".git" >>= \x1 -> return $ if x1
then Just Git
else Nothing
This code only works correctly if called in the root directory of the repository. It's a common practice to develop more than one cabal package in a single repository by placing each package in a sub-directory. For that we must support detection of the VCS in sub-directories.
getVCS :: IO (Maybe RepoType)
getVCS =
doesDirectoryExist ".hg" >>= \x0 -> if x0
then return (Just Mercurial)
else doesDirectoryExist ".git" >>= \x1 -> return $ if x1
then Just Git
else Nothing {- TODO if pwd is not call getVCS on ".." -}
Metadata
Metadata
Assignees
Labels
No labels