Skip to content

Commit

Permalink
Fixing error.t in github checks
Browse files Browse the repository at this point in the history
  • Loading branch information
spog committed Nov 17, 2024
1 parent 8594a15 commit 6a00572
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ help:

.PHONY: test
test:
prove $(prove) $(test)
prove $(prove) -v $(test)

test-all: test docker-tests

Expand Down
2 changes: 1 addition & 1 deletion lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ assert-repo-is-ready() {
[[ $command =~ ^(help|version|upgrade)$ ]] && return

# We must be inside a git repo:
git rev-parse --git-dir &> /dev/null ||
git rev-parse --is-inside-git-dir &> /dev/null ||
error "Not inside a git repository."

# Get the original branch and commit:
Expand Down
8 changes: 8 additions & 0 deletions test/error.t
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ clone-foo-and-bar
)
}

whoami
ls -al
set +e
cd .git
git symbolic-ref --short --quiet HEAD
echo $?
cd -
set -e
{
is "$(
cd lib
Expand Down
8 changes: 8 additions & 0 deletions test/setup
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ 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"
set +e
git symbolic-ref --short --quiet HEAD
if [ $? -ne 0 ]; then
git checkout -b test
fi
set -e
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.
Expand Down

0 comments on commit 6a00572

Please sign in to comment.