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

add support for docker daemon not running

This commit is contained in:
Tin Lai 2020-06-10 08:14:06 +10:00
parent 6975d30818
commit 837935d07e

View File

@ -0,0 +1,16 @@
from thefuck.shells import shell
from thefuck.utils import for_app
from thefuck.specific.sudo import sudo_support
@for_app("docker")
def match(command):
return ('docker: Cannot connect to the Docker daemon' in command.output and
'Is the docker daemon running?' in command.output)
@sudo_support
def get_new_command(command):
cmd = command.script_parts[0]
return shell.and_('systemctl start {}'.format(cmd),
command.script)