fix(linux): respect pre-existing STEAM_COMPAT_DATA_PATH and STEAM_COMPAT_CLIENT_INSTALL_PATH env vars#191
Merged
Merged
Conversation
…PAT_CLIENT_INSTALL_PATH env vars Previously the Linux launcher unconditionally overwrote these env vars with auto-detected Steam paths. Users with a custom Wine prefix (e.g. Lutris) or non-standard Steam layout couldn't override them via environment variables. Now the launcher only sets these values if they aren't already set in the environment, allowing users to specify a custom prefix or Proton setup.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Linux platform environment setup to avoid overriding Steam compatibility environment variables when the user has already provided them.
Changes:
- Preserve existing
STEAM_COMPAT_CLIENT_INSTALL_PATHif set in the user environment. - Preserve existing
STEAM_COMPAT_DATA_PATHif set in the user environment. - Adjust compatdata detection logic to run conditionally based on existing env vars.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
108
to
114
| steam_root = _detect_steam_root() | ||
| if steam_root: | ||
| if steam_root and "STEAM_COMPAT_CLIENT_INSTALL_PATH" not in env: | ||
| env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = str(steam_root) | ||
| compat_data = _detect_compat_data_path(steam_root) | ||
| if "STEAM_COMPAT_DATA_PATH" not in env: | ||
| compat_data = _detect_compat_data_path(steam_root) if steam_root else None | ||
| if compat_data: | ||
| env["STEAM_COMPAT_DATA_PATH"] = str(compat_data) |
Collaborator
|
Thanks for this small fix. I'm testing the |
Contributor
Author
|
yeah I had the bug on my own machine so I thought why not patch it lol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the Linux launcher unconditionally overwrote these env vars
with auto-detected Steam paths. Users with a custom Wine prefix
(e.g. Lutris) or non-standard Steam layout couldn't override them
via environment variables.
Now the launcher only sets these values if they aren't already set
in the environment, allowing users to specify a custom prefix or
Proton setup.