fix: do not forward process arguments to GApplication by default by shiaho777 · Pull Request #949 · Relm4/Relm4 · GitHub
Skip to content

fix: do not forward process arguments to GApplication by default - #949

Open
shiaho777 wants to merge 1 commit into
Relm4:mainfrom
shiaho777:fix-gio-application-arguments
Open

shiaho777 wants to merge 1 commit into
Relm4:mainfrom
shiaho777:fix-gio-application-arguments

Conversation

@shiaho777

Copy link
Copy Markdown

Summary

RelmApp::run and run_async called Application::run when with_args was not set. That forwards the process argv to GIO. Flags the application had already parsed, such as a clap --demo flag, were then rejected as unknown options and the process exited.

The default path now passes only the program name. with_args still forwards the vector the caller supplied.

cargo fmt was run. cargo clippy and cargo test were not run here because gtk4 is not installed. The argument helper has unit tests that need the crate to compile.

Checklist

  • cargo fmt
  • cargo clippy
  • cargo test
  • updated CHANGES.md

Application.run parses the process argv. Flags the app has already consumed were rejected as unknown options. Unless with_args is set, only the program name is passed through.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant