✅ test(scripts): quiet git init warnings
This commit is contained in:
parent
5822a8736d
commit
5b895807b5
|
|
@ -8,7 +8,7 @@ setup() {
|
||||||
export PLAYBOOK_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)"
|
export PLAYBOOK_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)"
|
||||||
# 初始化测试项目
|
# 初始化测试项目
|
||||||
cd "$TEST_DIR"
|
cd "$TEST_DIR"
|
||||||
git init
|
git init -b main
|
||||||
git config user.name "Test User"
|
git config user.name "Test User"
|
||||||
git config user.email "test@example.com"
|
git config user.email "test@example.com"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ setup() {
|
||||||
# 创建目标项目目录
|
# 创建目标项目目录
|
||||||
export TARGET_DIR="$(mktemp -d)"
|
export TARGET_DIR="$(mktemp -d)"
|
||||||
cd "$TARGET_DIR"
|
cd "$TARGET_DIR"
|
||||||
git init
|
git init -b main
|
||||||
git config user.name "Test User"
|
git config user.name "Test User"
|
||||||
git config user.email "test@example.com"
|
git config user.email "test@example.com"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue