You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've been missing the ability to try out commands without actually running them. It is often possible to do it with the correct
nix build <something> --dry-run
but it's frustratingly difficult to figure out which one. An incomplete list of commands where I have been missing it:
nix run foo#bar --dry-run
nix profile install foo#bar --dry-run
nix profile upgrade '.*' --dry-run
nix develop --dry-run
nix flake update --dry-run
Describe the solution you'd like
Add a --dry-run flag to as many as possible of the new nix something commands, that shows what would happen without actually doing it.
Describe alternatives you've considered
As I mentioned above, there is sometimes an argument that could be given to nix build to get the desired behaviour, but it's difficult to find out which one and it is annoying to need to change the entire command instead of just adding a flag. You can also just run the command and immediately press ctrl-c, which is often what I have done as a workaround, but that doesn't always work.
Additional context
The text was updated successfully, but these errors were encountered:
This would be very useful, for example when creating a large configuration.nix for reasons of checking its correctness without instantiating the changes on disk.
I found this thread as I was searching for a way to view updates only (without updating the flake.lock). The --dry-run flag would be a welcome addition for this use case. To confirm, there is no native way to currently get this behavior, right?
Anyways, the best I've managed so far is using process substitution:
# The poor man's `--dry-run`. Allows you to see available updates without updating flake.lock.
nix flake update --output-lock-file <(cat flake.nix)
Is your feature request related to a problem? Please describe.
I've been missing the ability to try out commands without actually running them. It is often possible to do it with the correct
but it's frustratingly difficult to figure out which one. An incomplete list of commands where I have been missing it:
nix run foo#bar --dry-run
nix profile install foo#bar --dry-run
nix profile upgrade '.*' --dry-run
nix develop --dry-run
nix flake update --dry-run
Describe the solution you'd like
Add a
--dry-run
flag to as many as possible of the newnix something
commands, that shows what would happen without actually doing it.Describe alternatives you've considered
As I mentioned above, there is sometimes an argument that could be given to
nix build
to get the desired behaviour, but it's difficult to find out which one and it is annoying to need to change the entire command instead of just adding a flag. You can also just run the command and immediately press ctrl-c, which is often what I have done as a workaround, but that doesn't always work.Additional context
The text was updated successfully, but these errors were encountered: