1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

Merge aa7817937b86e5155d77c01c8d852c8ce9b60663 into c7e7e1d884d3bb241ea6448f72a989434c2a35ec

This commit is contained in:
Tin Lai 2024-05-11 07:32:47 +08:00 committed by GitHub
commit 71700a9535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 ('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)