tests: enable colors in git config

Force colors in git config so we can test that we don't get color codes
in our last commit.

ref https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10042
This commit is contained in:
Natanael Copa 2021-10-07 13:02:25 +02:00
parent e510181626
commit 3d9918f14d
1 changed files with 3 additions and 0 deletions

View File

@ -8,8 +8,10 @@ setup() {
export REPODEST="$tmpdir"/packages
export CLEANUP="srcdir bldroot pkgdir deps"
export WORKDIR="$tmpdir"/work
export GIT_CONFIG_GLOBAL="$tmpdir"/gitconfig
mkdir -p "$tmpdir" "$WORKDIR"
printf "[color]\n\tui = always\n" > "$GIT_CONFIG_GLOBAL"
}
teardown() {
@ -176,3 +178,4 @@ teardown() {
run grep -x py3.9:bar=1.0.0-r0 pkg/.control.py3-foo-and-bar/.py-provides
run grep -x 'provides py3.9:bar=1.0.0-r0' pkg/.control.py3-foo-and-bar/.PKGINFO
}