From 9770fde5f4f337c28f3a90a72388a6175659a3a5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Mar 2022 14:01:45 -0400 Subject: [PATCH] hard link git-annex to fix ./git-annex test 2fc46e1871e2f793689cc98523744040c9010bdc broke running ./git-annex test when git-annex-shell is not in PATH from another install, and also caused the wrong git-annex-shell to be tested. Using a symlink made programPath return the .cabal/ directory where the git-annex binary is, but git-annex-shell is not in that directory. Changing to a hard link avoids that problem. Sponsored-by: Dartmouth College's Datalad project --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6114f0d324..b7ebe03db5 100644 --- a/Makefile +++ b/Makefile @@ -57,12 +57,12 @@ dev: git-annex: tmp/configure-stamp $(BUILDER) build $(BUILDERCOMMONOPTIONS) $(BUILDEROPTIONS) @if [ "$(BUILDER)" = stack ]; then \ - ln -sf $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \ + ln -f $$(stack path $(BUILDERCOMMONOPTIONS) --dist-dir)/build/git-annex/git-annex git-annex; \ else \ if [ -d dist-newstyle ]; then \ - ln -sf $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \ + ln -f $$(cabal exec -- sh -c 'command -v git-annex') git-annex; \ else \ - ln -sf dist/build/git-annex/git-annex git-annex; \ + ln -f dist/build/git-annex/git-annex git-annex; \ fi; \ fi