1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 02:01:13 +00:00

Merge branch 'reitermarkus-patch-1'

This commit is contained in:
Vladimir Iakovlev 2017-09-10 07:56:45 +02:00
commit ec5b69ca63
3 changed files with 0 additions and 33 deletions

View File

@ -280,7 +280,6 @@ Enabled by default only on specific platforms:
* `brew_uninstall` – adds `--force` to `brew uninstall` if multiple versions were installed;
* `brew_unknown_command` – fixes wrong brew commands, for example `brew docto/brew doctor`;
* `brew_update_formula` &ndash; turns `brew update <formula>` into `brew upgrade <formula>`;
* `brew_upgrade` &ndash; appends `--all` to `brew upgrade` as per Homebrew's new behaviour;
* `pacman` &ndash; installs app with `pacman` if it is not installed (uses `yaourt` if available);
* `pacman_not_found` &ndash; fixes package name with `pacman` or `yaourt`.

View File

@ -1,15 +0,0 @@
import pytest
from thefuck.rules.brew_upgrade import match, get_new_command
from thefuck.types import Command
@pytest.mark.parametrize('command', [
Command('brew upgrade', '')])
def test_match(command):
assert match(command)
@pytest.mark.parametrize('command, new_command', [
(Command('brew upgrade', ''), 'brew upgrade --all')])
def test_get_new_command(command, new_command):
assert get_new_command(command) == new_command

View File

@ -1,17 +0,0 @@
# Appends --all to the brew upgrade command
#
# Example:
# > brew upgrade
# Warning: brew upgrade with no arguments will change behaviour soon!
# It currently upgrades all formula but this will soon change to require '--all'.
from thefuck.specific.brew import brew_available
enabled_by_default = brew_available
def match(command):
return command.script == 'brew upgrade'
def get_new_command(command):
return command.script + ' --all'