• quasicomputational's avatar
    Make Setup.hs configure more CWD-independent. · a31ab06a
    quasicomputational authored
    Previously, we were checking the package with a hard-coded root
    directory of ".". This was not a problem before, but with #5372 we
    have started to expand globs while checking packages, which breaks if
    the CWD is not the directory containing the `.cabal` file and causes
    snowleopard/hadrian#634.
    
    Luckily, this is an easy fix: the correct directory is easy to
    determine. Writing a test and making sure it's tickling the failing
    case took longer than writing the fix!
    
    "." is hard-coded as the root directory passed to `checkPackageFiles`
    in a few other places, but those are (a) non-trivial to test, and (b)
    already in places that have other assumptions about their CWD, so I
    have simply documented the CWD requirement for those.
    a31ab06a
Check.hs 93.4 KB