Skip to content

Commit

Permalink
git config in tests instead of papers, user.email bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
perrette committed Apr 28, 2023
1 parent a7377a6 commit 5d776bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions papers/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,6 @@ def installcmd(parser, o, config):
os.makedirs(config.gitdir, exist_ok=True)
config.gitcmd('init')

# setup user name and user email if not set (otherwise commit will fail)
config.gitcmd('config --list | grep user.name || git config --global user.name "Some One"')
config.gitcmd('config --list | grep user.email || git config --global user.name "[email protected]"')

if config.gitlfs:
config.gitcmd('lfs track "files/"')
Expand Down
5 changes: 5 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import subprocess as sp
# setup user name and user email if not set (otherwise commit will fail)
sp.check_call('git config --list | grep user.name || git config --global user.name "Papers Tests"', shell=True)
sp.check_call('git config --list | grep user.email || git config --global user.email "[email protected]"', shell=True)
del sp

0 comments on commit 5d776bf

Please sign in to comment.