diff options
| author | hallgren <hallgren@chalmers.se> | 2014-09-11 11:47:17 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-09-11 11:47:17 +0000 |
| commit | 4f9af46ed0f8a5d3bffdbbddc5ca00b5104bf027 (patch) | |
| tree | 4ec18eeb9987e09b11cdd694b78ad3bd3b5f0c0c | |
| parent | df0602723dcb0dd9a558aba9b29cdde8e7c4f6c9 (diff) | |
Setup.hs: don't ask darcs for the version history if _darcs is not present
This is to avoid a (harmless) error message from darcs when compiling sources
obtained e.g. from github.
| -rw-r--r-- | Setup.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -383,7 +383,8 @@ extractDarcsVersion distFlag = modname = "DarcsVersion_gf" askDarcs = - do tags <- lines `fmap` readProcess "darcs" ["show","tags"] "" + do flip unless (fail "no _darcs") =<< doesDirectoryExist "_darcs" + tags <- lines `fmap` readProcess "darcs" ["show","tags"] "" let from = case tags of [] -> [] tag:_ -> ["--from-tag="++tag] |
