Skip to content

Commit

Permalink
Paths: Detect when running though python -m rare
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed Nov 29, 2023
1 parent 3e7408e commit f672a67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rare/utils/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f672a67

Please sign in to comment.