1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00

Paths: Detect when running though python -m rare

This commit is contained in:
loathingKernel 2023-09-03 00:36:35 +03:00
parent 3e7408ee8f
commit f672a678c9
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD

View file

@ -132,6 +132,8 @@ def get_rare_executable() -> List[str]:
# lk: detect if nuitka
if "__compiled__" in globals():
executable = [sys.executable]
elif sys.argv[0].endswith("__main__.py"):
executable = [sys.executable, "-m", "rare"]
elif platform.system() == "Linux" or platform.system() == "Darwin" or platform.system() == "FreeBSD":
if p := os.environ.get("APPIMAGE"):
executable = [p]