mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-04 08:25:04 +08:00
GP-0: Fixing typo in pyghidra_launcher.py
This commit is contained in:
@@ -86,10 +86,10 @@ def in_venv() -> bool:
|
|||||||
def is_externally_managed() -> bool:
|
def is_externally_managed() -> bool:
|
||||||
get_default_scheme = 'get_default_scheme'
|
get_default_scheme = 'get_default_scheme'
|
||||||
if hasattr(sysconfig, get_default_scheme):
|
if hasattr(sysconfig, get_default_scheme):
|
||||||
# Python 3.10 and later
|
# Python 3.10 and later
|
||||||
default_scheme = getattr(sysconfig, get_default_scheme)
|
default_scheme = getattr(sysconfig, get_default_scheme)
|
||||||
else:
|
else:
|
||||||
# Python 3.9
|
# Python 3.9
|
||||||
default_scheme = getattr(sysconfig, f'_{get_default_scheme}')
|
default_scheme = getattr(sysconfig, f'_{get_default_scheme}')
|
||||||
marker: Path = Path(sysconfig.get_path("stdlib", default_scheme())) / 'EXTERNALLY-MANAGED'
|
marker: Path = Path(sysconfig.get_path("stdlib", default_scheme())) / 'EXTERNALLY-MANAGED'
|
||||||
return marker.is_file()
|
return marker.is_file()
|
||||||
@@ -214,7 +214,7 @@ def main() -> None:
|
|||||||
print('Run "gradle prepdev" and try again.')
|
print('Run "gradle prepdev" and try again.')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
python_cmd = get_venv_exe(venv_dir)
|
python_cmd = get_venv_exe(venv_dir)
|
||||||
print(f'Switchiing to Ghidra virtual environment: {venv_dir}')
|
print(f'Switching to Ghidra virtual environment: {venv_dir}')
|
||||||
else:
|
else:
|
||||||
# If in release mode, offer to install or upgrade PyGhidra before launching from user-controlled environment
|
# If in release mode, offer to install or upgrade PyGhidra before launching from user-controlled environment
|
||||||
pip_args: List[str] = ['-m', 'pip', 'install', '--no-index', '-f', str(dist_dir), 'pyghidra']
|
pip_args: List[str] = ['-m', 'pip', 'install', '--no-index', '-f', str(dist_dir), 'pyghidra']
|
||||||
|
|||||||
Reference in New Issue
Block a user