diff options
-rwxr-xr-x | scripts/dictcli.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/dictcli.py b/scripts/dictcli.py index 3676506e1..2f1f369b0 100755 --- a/scripts/dictcli.py +++ b/scripts/dictcli.py @@ -38,6 +38,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) from qutebrowser.browser.webengine import spell from qutebrowser.config import configdata from qutebrowser.utils import standarddir, utils +from scripts import utils as scriptutils API_URL = 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries.git/+/master/' @@ -219,7 +220,13 @@ def install(languages): print('Installing {}: {}'.format(lang.code, lang.name)) install_lang(lang) except PermissionError as e: - sys.exit(str(e)) + msg = ("\n{}\n\nWith Qt < 5.10, you will need to run this script " + "as root, as dictionaries need to be installed " + "system-wide. If your qutebrowser uses a newer Qt version " + "via a virtualenv, make sure you start this script with " + "the virtualenv's Python.".format(e)) + scriptutils.print_col(msg, 'red') + sys.exit(1) def update(languages): |