Skip to content

Commit

Permalink
Fix #151, Infinite recursion
Browse files Browse the repository at this point in the history
This removes some redundant code.
The rerun command is now set correctly.
It should no longer lead to Infinite recursion.
  • Loading branch information
marvin1099 authored Jan 3, 2025
1 parent c13d9dc commit 8b2e904
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,8 @@ def self_update(path: List[Optional[str]]) -> List[Optional[str]]:


def check_flatpak(flatpak_cmd: Optional[List[str]]) -> List[str]:
if flatpak_cmd == None:
if is_flatpak():
return ["python3"]
return []
elif is_flatpak():
flatpak_start = []
if is_flatpak():
flatpak_start = [
"flatpak-spawn",
"--host",
Expand Down Expand Up @@ -370,13 +367,11 @@ def check_flatpak(flatpak_cmd: Optional[List[str]]) -> List[str]:
flatpak_start.append(f"--env=WeModInfProtect={infpr}")
flatpak_start.append("--") # Isolate command from command args

if bool(flatpak_cmd): # if venv is set use it
flatpak_cmd = flatpak_start + flatpak_cmd
else: # if not use python executable
flatpak_cmd = flatpak_start + [sys.executable]

return flatpak_cmd

if flatpak_cmd: # if venv is set use it
flatpak_cmd = flatpak_start + flatpak_cmd
else: # if not use python executable
flatpak_cmd = flatpak_start + [sys.executable]


def setup_main() -> None:
import tempfile
Expand Down

0 comments on commit 8b2e904

Please sign in to comment.