diff --git a/thefuck/rules/port_already_in_use.py b/thefuck/rules/port_already_in_use.py index 43171d6..8264775 100644 --- a/thefuck/rules/port_already_in_use.py +++ b/thefuck/rules/port_already_in_use.py @@ -1,8 +1,10 @@ import re from subprocess import Popen, PIPE -from thefuck.utils import memoize +from thefuck.utils import memoize, which from thefuck.shells import shell +enabled_by_default = bool(which('lsof')) + patterns = [r"bind on address \('.*', (?P\d+)\)", r'Unable to bind [^ ]*:(?P\d+)', r"can't listen on port (?P\d+)",