From 971ee69908b67845b0c527dde3205ad7f3828c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 2 Aug 2020 13:29:12 +0200 Subject: [PATCH] Import CommandNotFound system package on Debian --- thefuck/rules/apt_get.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thefuck/rules/apt_get.py b/thefuck/rules/apt_get.py index ed6033b0..a073cac0 100644 --- a/thefuck/rules/apt_get.py +++ b/thefuck/rules/apt_get.py @@ -1,8 +1,15 @@ +import sys + from types import ModuleType from thefuck.specific.apt import apt_available from thefuck.utils import memoize, which from thefuck.shells import shell +# Debian does not have a python{,3}-commandnotfound package +# and the command-not-found package places the python module in another directory +# To import it correctly append the path to the sys.path +sys.path.append('/usr/share/command-not-found/') + try: from CommandNotFound import CommandNotFound