Skip to content

Commit d30a789

Browse files
Ryan Delaneyrpdelaney
authored andcommitted
Remove paths from for_app invocations in rules
I presume that the `./` in `./gradlew` was used here because thefuck would not find an app match on just `gradlew`, and thus no fucks would be given on the most common and idiomatic way of invoking gradlew. After 8faf9b1, thefuck does not distinguish between commands with paths and those without. Therefore, the tests for this rule are now broken because thefuck strips paths from the _user_'s command, but not from the for_app decoration. This commit addresses that problem by changing the for_app decoration to this rule.
1 parent c8a41ba commit d30a789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thefuck/rules/gradle_no_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
regex = re.compile(r"Task '(.*)' (is ambiguous|not found)")
66

77

8-
@for_app('gradle', './gradlew')
8+
@for_app('gradle', 'gradlew')
99
def match(command):
1010
return regex.findall(command.output)
1111

0 commit comments

Comments
 (0)