Skip to content

Commit

Permalink
test: safety check to confirm we're in the sandbox repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jun 21, 2017
1 parent 2bb36a3 commit 494c54e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/git-open.bats
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@ function create_git_sandbox() {
rm -rf "$foldername"
mkdir "$foldername"
cd "$foldername"
# safety check. Don't muck with the git repo if we're not inside the sandbox.
assert_equal $(basename $PWD) "$foldername"

git init -q
assert [ -e "../$foldername/.git" ]
git config user.email "[email protected]" && git config user.name "Test Runner"

# newer git auto-creates the origin remote
Expand Down

0 comments on commit 494c54e

Please sign in to comment.