diff --git a/thefuck/entrypoints/main.py b/thefuck/entrypoints/main.py index f41f0c3..63f9d8c 100644 --- a/thefuck/entrypoints/main.py +++ b/thefuck/entrypoints/main.py @@ -10,7 +10,6 @@ from ..argument_parser import Parser # noqa: E402 from ..utils import get_installation_info # noqa: E402 from .alias import print_alias # noqa: E402 from .fix_command import fix_command # noqa: E402 -from .shell_logger import shell_logger # noqa: E402 def main(): @@ -27,6 +26,11 @@ def main(): elif known_args.alias: print_alias(known_args) elif known_args.shell_logger: - shell_logger(known_args.shell_logger) + try: + from .shell_logger import shell_logger # noqa: E402 + except ImportError: + logs.warn('Shell logger supports only Linux and macOS') + else: + shell_logger(known_args.shell_logger) else: parser.print_usage()