Skip to content

Commit

Permalink
Prefer failing early when assigning empty PROTONPATH
Browse files Browse the repository at this point in the history
- In the case the user was offline and a Proton could not be found or downloaded, the launcher would fail when building the command and notify them of the missing proton file. Instead, the launcher should fail early to precisely indicate that Proton failed to be assigned
  • Loading branch information
R1kaB3rN committed Mar 26, 2024
1 parent b525d16 commit 5470ef7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions umu/umu_dl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_umu_proton(env: Dict[str, str]) -> Union[Dict[str, str]]:

# No internet and compat tool is empty, just return and raise an
# exception from the caller
environ["PROTONPATH"] = ""
return env


Expand Down
4 changes: 2 additions & 2 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def check_env(env: Dict[str, str]) -> Union[Dict[str, str], Dict[str, Any]]:
if not os.environ["PROTONPATH"]:
err: str = (
"Download failed\n"
"umu-Proton could not be found in cache or compatibilitytools.d\n"
"Please set $PROTONPATH or visit https://github.com/Open-Wine-Components/umu-Proton/releases"
"UMU-Proton could not be found in cache or compatibilitytools.d\n"
"Please set $PROTONPATH or visit https://github.com/Open-Wine-Components/umu-proton/releases"
)
raise FileNotFoundError(err)

Expand Down

0 comments on commit 5470ef7

Please sign in to comment.