1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-04-15 15:20:42 +01:00

better implementation

This commit is contained in:
Divya Jain 2020-06-08 22:45:48 +05:30
parent 175b59214a
commit 2296954b2b
No known key found for this signature in database
GPG Key ID: F992009F2176805E

View File

@ -1,18 +1,14 @@
from thefuck.utils import replace_argument
from thefuck.specific.git import git_support
hooked_commands = ["am", "commit", "push"]
hooked_commands = ("am", "commit", "push")
@git_support
def match(command):
has_hooked_command = any(
return any(
hooked_command in command.script_parts for hooked_command in hooked_commands
)
return (
has_hooked_command
and "hook failed (add --no-verify to bypass)" in command.output
)
@git_support
@ -25,3 +21,8 @@ def get_new_command(command):
return replace_argument(
command.script, hooked_command, hooked_command + " --no-verify"
)
priority = 900
enabled_by_default = True
requires_output = False