Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missleading CLI arguments #336

Merged
merged 1 commit into from
Jun 7, 2024
Merged

fix missleading CLI arguments #336

merged 1 commit into from
Jun 7, 2024

Conversation

solc42
Copy link
Contributor

@solc42 solc42 commented May 24, 2024

It looks very strange, but CLI arguments -d/-m help descriptions are inverted vs actual behaviour.

Those flags are passed as is to corresponding library methods

/// Set true if migration process should abort if divergent migrations are found
/// i.e. applied migrations with the same version but different name or checksum from the ones on the filesystem.
/// by default this is set to true
pub fn set_abort_divergent(self, abort_divergent: bool) -> Runner {

and

/// Set true if migration process should abort if missing migrations are found
/// i.e. applied migrations that are not found on the filesystem,
/// or migrations found on filesystem with a version inferior to the last one applied but not applied.
/// by default this is set to true
pub fn set_abort_missing(self, abort_missing: bool) -> Runner {

Mb by design the default behaviour expected to be fail fast, but nowadays it is not. So keeping the same behaviour, let's correct the CLI help msg =)

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup you are right! Thanks for this ❤️

@jxs jxs merged commit ba37279 into rust-db:main Jun 7, 2024
29 checks passed
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