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

Can not set negative priorities with nix-env #11513

Open
andrewhamon opened this issue Sep 17, 2024 · 0 comments
Open

Can not set negative priorities with nix-env #11513

andrewhamon opened this issue Sep 17, 2024 · 0 comments
Labels

Comments

@andrewhamon
Copy link

andrewhamon commented Sep 17, 2024

Describe the bug

I can set a positive priority:

nix-env --set-flag priority 100 python3-3.8.13
setting flag on 'python3-3.8.13'
...

But I can not set a negative priority:

nix-env --set-flag priority -100 python3-3.8.13
error: unknown flag '-100'
Try '/nix/store/c2655winvkf91w744rd6jdihjniiziap-nix-2.22.0/bin/nix-env --help' for more information.

If I try priority=, nix-env silently exits 0, but doesn't actually change the priority:

nix-env --set-flag priority=-100 python3-3.8.13
# does nothing

Steps To Reproduce

  1. nix-env --set-flag priority -100 foo

Expected behavior

I should be able to set negative priorities.

nix-env --version output

nix-env (Nix) 2.22.0

Additional context

lib.hiPrio uses negative values, which tells me that negative values are valid. I can't find any documentation that indicates that negative values are not valid.

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant