Skip to content

fix(cli): add MaybeWorkspace to license field#8672

Merged
FabianLars merged 4 commits into
tauri-apps:devfrom
Sanctum-AI:fix-license-field-cargo
Jan 26, 2024
Merged

fix(cli): add MaybeWorkspace to license field#8672
FabianLars merged 4 commits into
tauri-apps:devfrom
Sanctum-AI:fix-license-field-cargo

Conversation

@Andreybest
Copy link
Copy Markdown
Contributor

Got the bug in a project after updating to latest v2-alpha.
And got this error:

> pnpm tauri dev

       Error failed to load cargo settings: failed to parse Cargo.toml: TOML parse error at line 6, column 11
  |
6 | license = { workspace = true }
  |           ^^^^^^^^^^^^^^^^^^^^
invalid type: map, expected a string

 ELIFECYCLE  Command failed with exit code 1.

From what I saw in a code, license field was expected to be either String or None, but not workspace. Made it same as other fields (by copy-pasting code from them).

I think that it should work with any other case, but at least it fixes my issue. Let me know if I made something wrong. Will try to be fast with responses.

Checks

  • cargo test passes
  • cargo clippy passes
  • cargo fmt locally passes
  • if cli installed with cargo install and used via cargo tauri dev with a license field like license = { workspace = true }, exception is not being thrown

@Andreybest Andreybest requested a review from a team as a code owner January 25, 2024 00:09
@FabianLars
Copy link
Copy Markdown
Member

Thanks for contributing! Could you also add a changefile similar to https://github.com/tauri-apps/tauri/blob/dev/.changes/cli-config-target-mobile.md please?

@Andreybest
Copy link
Copy Markdown
Contributor Author

@FabianLars Added, hope my phrasing is correct here.

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