mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 09:39:01 +00:00
14 lines
330 B
Python
14 lines
330 B
Python
import os
|
|
from thefuck.utils import for_app, which
|
|
|
|
|
|
@for_app('gradle')
|
|
def match(command):
|
|
return (not which(command.script_parts[0])
|
|
and 'not found' in command.stderr
|
|
and os.path.isfile('gradlew'))
|
|
|
|
|
|
def get_new_command(command):
|
|
return u'./gradlew {}'.format(' '.join(command.script_parts[1:]))
|