1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-20 01:28:56 +00:00
thefuck/thefuck/rules/docker_login.py
Inga Feick 828ae537da Docker login (#894)
* Add docker_login rule

* Add docker_login rule

* Whitespace fix

* Fix typo in test case

* Fix typo in test case

* Add test cases
2019-04-04 00:01:14 +02:00

13 lines
315 B
Python

from thefuck.utils import for_app
@for_app('docker')
def match(command):
return ('docker' in command.script
and "access denied" in command.output
and "may require 'docker login'" in command.output)
def get_new_command(command):
return 'docker login && {}'.format(command.script)