Fix missing game settings info in logs #2638
Merged
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.
This PR https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2563/files introduced a regression. Because we are calling
writeFileSync
in the 2 places, the second call (system info) replaces the content of the file that had the content of the first call (the game settings).Now it uses writeFileSync for the game settings and then appendFileSync for the system info to not override the content.
The game settings are now the first part of the file, before the 2.7 release the system info was first. This is not that easy to avoid since the system info fetch is async on purpose cause it can get stuck, so we can't wait for it to be the beginning of the file.
Use the following Checklist if you have changed something on the Backend or Frontend: