Skip to content

Conversation

@sasa-tomic
Copy link
Collaborator

@sasa-tomic sasa-tomic commented Mar 12, 2025

Improvements

  • Help Handling: Implement manual '--help' handling in Propose struct, disabling automatic flag parsing to manage propose subcommands.
  • Dry-Run Mode: Enable dry-run mode when '--help' is present to bypass interactive prompts.

### Key Changes

- **Disable Automatic Help Flag Parsing:**
  - Added `#[clap(disable_help_flag = true)]` to `Propose` struct to manually handle `--help`.

- **Manual Help Handling:**
  - Updated the `execute` method in the `Propose` command to call `ctx.help_propose(None)` when `--help` is detected.

- **Modify Submission Parameters:**
  - Enabled dry-run mode if `--help` is present to bypass unnecessary interactive prompts.

- **Access Control Adjustment:**
  - Changed `dry_run` in `ConfirmationModeOptions` from private to `pub(crate)` to support manual help handling.

- **Documentation and Comments:**
  - Updated comments to explain the manual handling of the `--help` flag and its effect on submission parameters.
@sasa-tomic sasa-tomic self-assigned this Mar 12, 2025
@sasa-tomic sasa-tomic marked this pull request as ready for review March 12, 2025 09:39
@sasa-tomic sasa-tomic requested a review from a team as a code owner March 12, 2025 09:39
@sasa-tomic sasa-tomic merged commit 293c69a into main Mar 12, 2025
7 checks passed
@sasa-tomic sasa-tomic deleted the fix/help-flag-handling branch March 12, 2025 10:57
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.

2 participants