mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Support unit prefixes in configuration settings
E.g. you can now say `--min-free 1G`.
This commit is contained in:
parent
d8d20307a8
commit
79c7d6205c
4 changed files with 19 additions and 6 deletions
|
@ -66,4 +66,9 @@ exp_features=$(nix config show | grep '^experimental-features' | cut -d '=' -f 2
|
|||
# Test that it's possible to retrieve a single setting's value
|
||||
val=$(nix config show | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)
|
||||
val2=$(nix config show warn-dirty)
|
||||
[[ $val == $val2 ]]
|
||||
[[ $val == $val2 ]]
|
||||
|
||||
# Test unit prefixes.
|
||||
[[ $(nix config show --min-free 64K min-free) = 65536 ]]
|
||||
[[ $(nix config show --min-free 1M min-free) = 1048576 ]]
|
||||
[[ $(nix config show --min-free 2G min-free) = 2147483648 ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue