Open nlander opened 1 year ago
Thanks for the report! It shouldn't be hard to fix but there are two ways one can go (you can also do both): improve cleanup in the testsuite (this could fix some more issues like this) or make cabal-get less strict about overwrites.
The “improve cleanup” solution can be made easier if you download a specific criterion
version, i.e.
import Test.Cabal.Prelude
main = cabalTest $ withRepo "repo" $ do
cabal "update" []
cabal
"get"
[ "criterion-1.2.2.0", "--only-package-description" ] -- Notice 1.2.2.0 here.
Then you can simply call removeFile
.
That could work fine, i guess. But more generally I'd expect the cabalTest
utility to make sure that tests run in a clean environment…
Describe the bug The test cabal-testsuite/PackageTests/Get/OnlyDescription/cabal.test.hs succeeds on first run and then fails on all subsequent runs
To Reproduce In the cabal directory
Expected behavior I would expect that running this test more than once produces the same result. If it passed once, it should pass again. If it failed once, it should fail again (for the same reason).
System information
Additional context This issue is being filed as a result of discussion in the hackage irc channel.