hotfix: the user may be define an extra arguments for a removed hook
This commit is contained in:
parent
37d0e19fd8
commit
926208fb31
|
@ -5,7 +5,7 @@ from typing import Sequence
|
|||
|
||||
def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
argv = argv if argv is not None else sys.argv[1:]
|
||||
hookid, new_hookid, url = argv
|
||||
hookid, new_hookid, url = argv[:3]
|
||||
raise SystemExit(
|
||||
f'`{hookid}` has been removed -- use `{new_hookid}` from {url}',
|
||||
)
|
||||
|
|
|
@ -8,6 +8,7 @@ def test_always_fails():
|
|||
main((
|
||||
'autopep8-wrapper', 'autopep8',
|
||||
'https://github.com/pre-commit/mirrors-autopep8',
|
||||
'--foo', 'bar',
|
||||
))
|
||||
msg, = excinfo.value.args
|
||||
assert msg == (
|
||||
|
|
Loading…
Reference in New Issue