1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-04-16 07:40:44 +01:00

#N/A: Disable port_already_in_use on systems without lsof

This commit is contained in:
Vladimir Iakovlev 2016-08-14 08:39:26 +03:00
parent a1f115eb19
commit a3eb124033

View File

@ -1,8 +1,10 @@
import re import re
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from thefuck.utils import memoize from thefuck.utils import memoize, which
from thefuck.shells import shell from thefuck.shells import shell
enabled_by_default = bool(which('lsof'))
patterns = [r"bind on address \('.*', (?P<port>\d+)\)", patterns = [r"bind on address \('.*', (?P<port>\d+)\)",
r'Unable to bind [^ ]*:(?P<port>\d+)', r'Unable to bind [^ ]*:(?P<port>\d+)',
r"can't listen on port (?P<port>\d+)", r"can't listen on port (?P<port>\d+)",