Fix environment variables missing during undo_cmd in prep cmds#202
Merged
Nonary merged 3 commits intoNonary:masterfrom Apr 17, 2026
Merged
Fix environment variables missing during undo_cmd in prep cmds#202Nonary merged 3 commits intoNonary:masterfrom
Nonary merged 3 commits intoNonary:masterfrom
Conversation
…p_id Agent-Logs-Url: https://github.com/Daviex/Vibepollo/sessions/43fe0632-63d8-4fef-918e-e3b07385fdd2 Co-authored-by: Daviex <745720+Daviex@users.noreply.github.com>
fix: replace copy-pasted "Playnite URI launch started" logs with correct messages
Only replace the stored environment in update_apps if no app is currently running (_app_id <= 0). Previously _env was always replaced when updating apps, but execute() writes stream-specific variables (APOLLO_APP_UUID, APOLLO_CLIENT_UUID, SUNSHINE_CLIENT_*, etc.) that must survive until terminate() runs undo/prep commands. The change keeps the scoped lock and moves the env assignment behind a conditional to preserve those variables while an app is active.
There was a problem hiding this comment.
Pull request overview
Fixes loss of stream/session-specific environment variables during config refresh while an app is running, which could break undo prep commands (and tools like ApolloProfileManager) during termination.
Changes:
- Replaces two incorrect log messages with warnings that match the actual failure conditions (trailing
$in env-var parsing, SHA256 computation failure fallback). - Updates
proc_t::update_apps()to avoid overwriting_envwhile an app is active, preserving stream-specific variables until termination completes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Hello Nonary,
using ApolloProfileManager, I found out it wasn't working because when the stream goes into terminating because the update apps function was replacing entirely the envs, losing access to app and client uuid, and couldn't save into the profile the edits done by the current client.
This fix aims to fix this problem by checking that currently are no app running before overwriting the environments. I tried it locally and now ApolloProfileManager works flawlessly.
Also added 2 logs with correct wording for it.
Thanks for your work.