Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-test list throws exception if you have no tests #21

Open
LemmingAvalanche opened this issue Oct 9, 2021 · 0 comments
Open

git-test list throws exception if you have no tests #21

LemmingAvalanche opened this issue Oct 9, 2021 · 0 comments

Comments

@LemmingAvalanche
Copy link

On 21048cc (“Merge pull request #19 from mhagger/iter-tests”, 2021-05-03).

$ # Remove only test
$ ~/git-test/bin/git-test remove
$ ~/git-test/bin/git-test list
Traceback (most recent call last):
  File "/home/kristoffer/git-test/bin/git-test", line 1129, in <module>
    main(sys.argv[1:])
  File "/home/kristoffer/git-test/bin/git-test", line 1118, in main
    cmd_list(parser, options)
  File "/home/kristoffer/git-test/bin/git-test", line 832, in cmd_list
    for test in iter_tests():
  File "/home/kristoffer/git-test/bin/git-test", line 543, in iter_tests
    out = check_output(cmd)
  File "/home/kristoffer/git-test/bin/git-test", line 227, in check_output
    raise CalledProcessError(e.returncode, e.cmd, _decode_output(e.output))
subprocess.CalledProcessError: Command '['git', 'config', '--get-regexp', '--null', '^test\\.']' returned non-zero exit status 1
$ ~/git-test/bin/git-test add 'mvn --batch-mode -DskipTests=false surefire:test'
$ ~/git-test/bin/git-test list
default:
    command = mvn --batch-mode -DskipTests=false surefire:test
LemmingAvalanche added a commit to LemmingAvalanche/git-test that referenced this issue Oct 11, 2021
Output nothing instead of raising an exception if there are no scripts
to list.

Fix: mhagger#21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant