From 3f58667a26da9a810498571431f58d4b8964faac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samo=20Poga=C4=8Dnik?= Date: Sun, 17 Nov 2024 20:05:51 +0100 Subject: [PATCH] Fixing error.t in github checks --- Makefile | 2 +- test/error.t | 12 ++++++++++++ test/setup | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cee2f456..6cf13bca 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ help: .PHONY: test test: - prove $(prove) $(test) + prove $(prove) -v $(test) test-all: test docker-tests diff --git a/test/error.t b/test/error.t index 8604c1cf..5d2a68a0 100644 --- a/test/error.t +++ b/test/error.t @@ -115,6 +115,18 @@ clone-foo-and-bar ) } +whoami +ls -al +set +e +cd .git + git rev-parse --git-dir &> /dev/null || + echo "Not inside a git repository." + git rev-parse --git-dir + echo $? + git rev-parse --is-inside-git-dir + echo $? +cd - +set -e { is "$( cd .git diff --git a/test/setup b/test/setup index 7d40bdf7..28d14242 100644 --- a/test/setup +++ b/test/setup @@ -29,6 +29,8 @@ if [ ! -f "${HOME}/.gitconfig" ]; then git config --global user.name "Your Name" git config --global init.defaultBranch "master" git config --global --add safe.directory "$(pwd)" + git config --global --add safe.directory "$(pwd)/*" + git config --global --add safe.directory "$(pwd)/.git" fi # To be able to view current GIT confirguration during tests execution, # run the test suite by adding the '-v' option to the prove command.