mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +00:00
Merge aa7817937b86e5155d77c01c8d852c8ce9b60663 into c7e7e1d884d3bb241ea6448f72a989434c2a35ec
This commit is contained in:
commit
71700a9535
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 ('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