diff options
author | elig0n <eliran.gonen@gmail.com> | 2019-10-01 01:15:00 +0300 |
---|---|---|
committer | elig0n <eliran.gonen@gmail.com> | 2019-10-01 01:15:00 +0300 |
commit | 5ac6d251f5f8e4a1550474de9e773ad610124e6f (patch) | |
tree | fec527c5b22bee11ff070550ac71e66e2607e4f8 /scripts/dictcli.py | |
parent | a3ec34b55db4ee46f3cb67a277b84f335ae5c992 (diff) | |
download | qutebrowser-5ac6d251f5f8e4a1550474de9e773ad610124e6f.tar.gz qutebrowser-5ac6d251f5f8e4a1550474de9e773ad610124e6f.zip |
Add platform check to check_root()
Diffstat (limited to 'scripts/dictcli.py')
-rwxr-xr-x | scripts/dictcli.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/dictcli.py b/scripts/dictcli.py index 24ea523b4..8ece63c4a 100755 --- a/scripts/dictcli.py +++ b/scripts/dictcli.py @@ -245,14 +245,15 @@ def remove_old(languages): def check_root(): """Ask for confirmation if running as root when unnecessary.""" - if spell.can_use_data_path() and os.geteuid() == 0: - print("You're running Qt >= 5.10 which means qutebrowser will " - "load dictionaries from a path in your home-directory. " - "Unless you run qutebrowser as root (bad idea!), you " - "most likely want to run this script as your user. ") - answer = input("Do you want to continue anyways? [y/N] ") - if answer not in ['y', 'Y']: - sys.exit(0) + if sys.platform == "linux": + if spell.can_use_data_path() and os.geteuid() == 0: + print("You're running Qt >= 5.10 which means qutebrowser will " + "load dictionaries from a path in your home-directory. " + "Unless you run qutebrowser as root (bad idea!), you " + "most likely want to run this script as your user. ") + answer = input("Do you want to continue anyways? [y/N] ") + if answer not in ['y', 'Y']: + sys.exit(0) def main(): |