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

Confusing error message with a license in both allow and deny #600

Closed
SimSmith opened this issue Feb 6, 2024 · 0 comments · Fixed by #601
Closed

Confusing error message with a license in both allow and deny #600

SimSmith opened this issue Feb 6, 2024 · 0 comments · Fixed by #601
Assignees
Labels
bug Something isn't working

Comments

@SimSmith
Copy link

SimSmith commented Feb 6, 2024

Describe the bug

When I put a license (e.g. "MIT") in both allow and deny, I get this error:

error: a license id was specified in both `allow` and `deny`
    ┌─ C:\...\deny.toml:104:5
    │
104 │     "CC0-1.0",
    │     --------- allow
    ·
117 │     "AGPL-3.0",
    │     ---------- deny

I would expect it to show "MIT" in both places instead of the last license in deny and the same place in allow.

To reproduce

Put this in deny.toml and run cargo deny check to get the same error:

[licenses]
allow = [
    "MIT",
    "Apache-2.0",
    "BSD-3-Clause",
    "ISC",
    "CC0-1.0",
    "Unicode-DFS-2016",
]
deny = [
   "MIT",
    "GPL-1.0",
    "GPL-2.0",
    "GPL-3.0",
    "AGPL-3.0",
]

But the error looks better if the licenses are on the same line.

cargo-deny version

cargo-deny 0.14.11

What OS were you running cargo-deny on?

Windows

Additional context

No response

@SimSmith SimSmith added the bug Something isn't working label Feb 6, 2024
@Jake-Shadle Jake-Shadle self-assigned this Feb 6, 2024
Jake-Shadle added a commit that referenced this issue Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants