mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-18 16:50:42 +01:00
add support for docker daemon not running
This commit is contained in:
parent
6975d30818
commit
837935d07e
16
thefuck/rules/docker_daemon_not_running.py
Normal file
16
thefuck/rules/docker_daemon_not_running.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user