mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos-option: fix #47722 when missing ~/.nix-defexpr/channels
The problem was that the non-fatal warning was not omitted from the output when constructing a nix expression. Now it seems OK for me. When return code is OK, the warnings don't get passed anywhere, but I expect that won't matter for this utility. Fatal errors are still shown.
This commit is contained in:
parent
0a7e258012
commit
de93b32f90
@ -82,7 +82,7 @@ evalNix(){
|
||||
set -e
|
||||
|
||||
if test $exit_code -eq 0; then
|
||||
cat <<EOF
|
||||
sed '/^warning: Nix search path/d' <<EOF
|
||||
$result
|
||||
EOF
|
||||
return 0;
|
||||
@ -90,7 +90,7 @@ EOF
|
||||
sed -n '
|
||||
/^error/ { s/, at (string):[0-9]*:[0-9]*//; p; };
|
||||
/^warning: Nix search path/ { p; };
|
||||
' <<EOF
|
||||
' >&2 <<EOF
|
||||
$result
|
||||
EOF
|
||||
exit_code=1
|
||||
|
Loading…
Reference in New Issue
Block a user