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

Behaviour change following v0.3.4 #40

Open
adityagoel4512 opened this issue Feb 17, 2025 · 2 comments · May be fixed by #39
Open

Behaviour change following v0.3.4 #40

adityagoel4512 opened this issue Feb 17, 2025 · 2 comments · May be fixed by #39
Assignees
Labels
bug Something isn't working

Comments

@adityagoel4512
Copy link
Member

adityagoel4512 commented Feb 17, 2025

Since v0.3.4 (specifically since #23), new assertions were added to ensure that both conda prefixes and pixi environments are not specified at the same time.

However, even when avoiding using the CLI environment flag, since the configurations were unified internally it will be pulled in from your pixi.toml if present (see https://github.com/Quantco/conda-deny/pull/23/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R188-R192).

How should users go about mixing CLI and config settings? Specifically, I care about running conda-deny check as a check in my conda build recipe so pointing to the $CONDA_PREFIX is highly convenient. At the same time, having something like the following in my pixi.toml is valuable for normal CI runs and local usage.

[tool.conda-deny]
license-whitelist = "my_licence_rules.toml"
environment = ["myenv"]
@adityagoel4512
Copy link
Member Author

I found main...fix-prefix-lockfile. Should I consider this to be a bug?

@pavelzw
Copy link
Member

pavelzw commented Feb 17, 2025

yes this what you described is a bug / not intended.
In general, the cli options should override the toml config and in this case, i think the most sensible thing is to just make ignore the toml options from environment. sorry about that

@pavelzw pavelzw added the bug Something isn't working label Feb 17, 2025
@pavelzw pavelzw self-assigned this Feb 17, 2025
@pavelzw pavelzw linked a pull request Feb 17, 2025 that will close this issue
Draft
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