feat: add run-after-update option to launch program after update#6
Merged
asforest merged 2 commits intoBalloonUpdate:mainfrom May 5, 2026
Merged
Conversation
Add a new configuration option `run-after-update` that specifies a program to launch automatically after the update process completes. When set to an empty string (default), no program is launched. When set to a path like "Plain Craft Launcher 2.exe", the specified program is spawned after all updates are applied. This is particularly useful for launching PCL2 or other Minecraft launchers immediately after updating modpack files.
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.
Description
Adds a
run-after-updateconfiguration option tomcpatch.ymlthat specifies a program to launch automatically after the update process completes.This is particularly useful for launching PCL2 or other Minecraft launchers immediately after updating modpack files, providing a seamless end-to-end update-and-launch experience.
Changes
client/src/global_config.rsrun_after_updatefield + parsingclient/src/work.rsConfiguration
```yaml
Program to launch after update completes
Leave empty to do nothing
Example: "Plain Craft Launcher 2.exe"
run-after-update: ""
```
Testing
Tested on both Debug and Release profiles on Windows.
Notes
The program is spawned via `std::process::Command::new(...).spawn()` after the update workflow returns `Ok(())`. If the program path is invalid, the error is silently ignored to avoid interrupting the update flow. The spawned program runs in the background and does not block the update exit.