feat(cli): allow runner configuration to be an object with cwd and args#13811
Merged
Legend-Master merged 9 commits intoJul 13, 2025
Merged
Conversation
Replaces runner String with RunnerConfig in CLI and config, allowing advanced runner configuration via string or object with cmd, cwd, and args. Updates schema and usage to support new format, and adds tests for serialization, deserialization, and API. Enables more flexible build and run command customization.
Cleaned up the test module in config.rs by removing the unused RunnerConfig import from two test functions.
Contributor
Package Changes Through 2f39a12There are 6 changes which include @tauri-apps/cli with patch, tauri-cli with minor, @tauri-apps/api with patch, tauri-bundler with patch, tauri with minor, tauri-utils with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Updates related tests in tauri-utils to improve readability and maintain consistency. Minor import reordering in tauri-cli for clarity.
Legend-Master
previously approved these changes
Jul 13, 2025
Contributor
Legend-Master
left a comment
There was a problem hiding this comment.
Thanks! Just a nitpick
Relocated the RunnerConfig enum and its associated implementations to appear before the BuildConfig definition. This improves code organization and logical grouping of configuration-related types.
Legend-Master
approved these changes
Jul 13, 2025
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.
This PR implements the feature requested in #13779 to allow the "runner" configuration in
tauri.conf.jsonto be either a string (existing behavior) or an object with additional properties.Changes
cmd: The command to execute (equivalent to the previous string format)cwd: Optional working directory to run the command fromargs: Optional array of arguments to pass to the runnerExample Usage
The runner can now be configured as an object:
{ "build": { "runner": { "cmd": "my_custom_cargo", "cwd": "/path/to/project", "args": ["--quiet", "--offline"] } } }Or continue using the existing string format for backwards compatibility:
{ "build": { "runner": "cargo" } }Backwards Compatibility
This change maintains full backwards compatibility - existing configurations using a string for the runner will continue to work as before.
Closes #13779