use cabal list-bin

cabal exec will sometimes output other messages to stdout, which
broke the build. It used to be intermittent in CI, now seems to always
happen. Messages are eg "Resolving dependencies..."

It seems that cabal list-bin never does this. I hope.

cabal list-bin is fairly new, needing cabal 3.8, which is only in Debian
testing/unstable. So fall back to cabal exec if it fails.
This commit is contained in:
Joey Hess 2024-05-31 10:28:56 -04:00
parent aeedca70ca
commit 4b818a65f4
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -61,7 +61,8 @@ git-annex: tmp/configure-stamp
ln -f $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \
else \
if [ -d dist-newstyle ]; then \
ln -f $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \
ln -f $$(cabal list-bin git-annex) git-annex || \
ln -f $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \
else \
ln -f dist/build/git-annex/git-annex git-annex; \
fi; \