mirror of
https://github.com/frida/frida-python
synced 2026-06-08 14:16:17 +00:00
Warn if gnureadline isn't available when running on Darwin
This commit is contained in:
+12
-8
@@ -4,15 +4,19 @@ def main():
|
||||
from colorama import Fore, Style
|
||||
import json
|
||||
import platform
|
||||
try:
|
||||
if platform.system() == "Darwin":
|
||||
# We really want to avoid libedit
|
||||
HAVE_READLINE = True
|
||||
if platform.system() == "Darwin":
|
||||
# We really want to avoid libedit
|
||||
try:
|
||||
import gnureadline as readline
|
||||
else:
|
||||
import readline
|
||||
HAVE_READLINE = True
|
||||
except:
|
||||
HAVE_READLINE = False
|
||||
except Exception as e:
|
||||
HAVE_READLINE = False
|
||||
print(Fore.RED + Style.BRIGHT + """
|
||||
WARNING: Unable to find package 'gnureadline' needed for tab completion;
|
||||
please brace yourself for a massively degraded user experience!
|
||||
""" + Style.RESET_ALL)
|
||||
else:
|
||||
import readline
|
||||
import sys
|
||||
import threading
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user