Skip to content

cargo-insta: allow passing --profile#402

Merged
mitsuhiko merged 1 commit intomitsuhiko:masterfrom
tamird:add-profile
Sep 9, 2023
Merged

cargo-insta: allow passing --profile#402
mitsuhiko merged 1 commit intomitsuhiko:masterfrom
tamird:add-profile

Conversation

@tamird
Copy link
Copy Markdown
Contributor

@tamird tamird commented Sep 8, 2023

Closes #381.

@mitsuhiko mitsuhiko merged commit 20656ad into mitsuhiko:master Sep 9, 2023
@tamird tamird deleted the add-profile branch September 9, 2023 18:38
@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Sep 10, 2023

Thanks @mitsuhiko. Could you cut a new cargo-insta release with this fix please?

Comment thread cargo-insta/src/cli.rs
pub release: bool,
/// Build artifacts with the specified profile
#[structopt(long)]
pub profile: String,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now profiles are required, the following doesn't work anymore:

cargo insta test

You need this:

cargo insta test --profile dev -- ui

Was this intended? If not I can create the fix PR with

-pub profile: String,
+pub profile: Option<String>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh boy, it's worse than that. The logic is looking at features rather than profile. Feel free to send a fix for both issues, else I'll do so tomorrow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll let you go for it because I didn't detect the other issue you just did :V

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Allow passing --profile

3 participants