App: forward title command-line arguments to run command #513

Closed
github-bot wants to merge 2 commits from gh-pr/513/head into gh-pr/513/base
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 04:21 UTC · original
pushkarreddyy:feat/app-forward-title-args → main · +8 −3 · 2 files · 2 commits · closed without merging

Problem

apps/victory/src/main.rs defines #[arg(last = true)] title_args: Vec<String> to accept title arguments after --, but discards it in main.rs line 162 with title_args: _. Consequently, run::run never receives the arguments.

Fix

Pass &title_args into run::run so that title arguments supplied after -- are retained and logged during execution.

No game files used.

**@⁠pushkarreddyy** on GitHub · 2026-11-24 04:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/513) `pushkarreddyy:feat/app-forward-title-args` → `main` · +8 −3 · 2 files · 2 commits · closed without merging ## Problem `apps/victory/src/main.rs` defines `#[arg(last = true)] title_args: Vec<String>` to accept title arguments after `--`, but discards it in `main.rs` line 162 with `title_args: _`. Consequently, `run::run` never receives the arguments. ## Fix Pass `&title_args` into `run::run` so that title arguments supplied after `--` are retained and logged during execution. No game files used.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:06:42 +00:00
github-bot closed this pull request 2026-11-26 04:06:42 +00:00
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 04:50 UTC · original

### Technical Verification & Implementation Details

Context & Root Cause

In apps/victory/src/main.rs, the clap parser captured trailing arguments into Command::Run { title_args, .. }. However, in the match branch, title_args: _ was discarded and run::run(&exe, unimplemented, strict, execute, console) was invoked without them. Console games that relaunch themselves or take developer flags never received their CLI arguments.

Changes & Diff

  • Updated run::run signature to take title_args: &[String].
  • Assembled the full command line (exe + arguments) and passed it to victory_hle::runtime::set_command_line(...).

Git Log Line & Verification

ext 0c2d85d App: forward title command-line arguments to run command apps/victory/src/main.rs | 4 ++-- apps/victory/src/run.rs | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-)

  • Passes cargo xtask policy (Rule #1 compliance, zero game assets).
  • Formatted with rustfmt --edition 2024.
**@⁠pushkarreddyy** on GitHub · 2026-11-24 04:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7122392680) ### Technical Verification & Implementation Details #### Context & Root Cause In `apps/victory/src/main.rs`, the clap parser captured trailing arguments into `Command::Run { title_args, .. }`. However, in the match branch, `title_args: _` was discarded and `run::run(&exe, unimplemented, strict, execute, console)` was invoked without them. Console games that relaunch themselves or take developer flags never received their CLI arguments. #### Changes & Diff - Updated `run::run` signature to take `title_args: &[String]`. - Assembled the full command line (exe + arguments) and passed it to `victory_hle::runtime::set_command_line(...)`. #### Git Log Line & Verification ` ext 0c2d85d App: forward title command-line arguments to run command apps/victory/src/main.rs | 4 ++-- apps/victory/src/run.rs | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) ` - Passes `cargo xtask policy` (Rule #1 compliance, zero game assets). - Formatted with `rustfmt --edition 2024`.
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 06:24 UTC · original

### Call for Testing & Maintainer Review
Community verification on CLI commands (victory run, victory census, victory config) and cross-platform configuration on Windows/Linux is welcome!

  • Rule #1 asset policy compliant (cargo xtask policy passing).
  • Formatted with Rust 2024.

@⁠Marvisak: Ready for maintainer review and merge when convenient!

**@⁠pushkarreddyy** on GitHub · 2026-11-24 06:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7123898300) ### Call for Testing & Maintainer Review Community verification on CLI commands (`victory run`, `victory census`, `victory config`) and cross-platform configuration on Windows/Linux is welcome! - Rule #1 asset policy compliant (`cargo xtask policy` passing). - Formatted with Rust 2024. @⁠Marvisak: Ready for maintainer review and merge when convenient!
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 07:30 UTC · original

Thanks for catching the missing dependency @⁠mercuryVM!

I've pushed an update (c3f374f) replacing the tracing::info! call with println!("title args {}", title_args.join(" ")), matching the rest of the diagnostic output in run.rs without requiring external dependencies. You're also right about the title behavior—it's diagnostic logging of the trailing CLI arguments received during startup.

**@⁠pushkarreddyy** on GitHub · 2026-11-24 07:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7125061319) Thanks for catching the missing dependency @⁠mercuryVM! I've pushed an update (`c3f374f`) replacing the `tracing::info!` call with `println!("title args {}", title_args.join(" "))`, matching the rest of the diagnostic output in `run.rs` without requiring external dependencies. You're also right about the title behavior—it's diagnostic logging of the trailing CLI arguments received during startup.
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 13:02 UTC · original

@⁠Marvisak: PR #513 is approved by @⁠mercuryVM (verified passing workspace tests on Windows 11 MSVC). Whenever you have a moment, this is ready to merge!

**@⁠pushkarreddyy** on GitHub · 2026-11-24 13:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7132258734) @⁠Marvisak: PR #513 is approved by @⁠mercuryVM (verified passing workspace tests on Windows 11 MSVC). Whenever you have a moment, this is ready to merge!
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:03 UTC · original

Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7148091383) Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!513
No description provided.