summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-10-04 16:52:17 +0200
committerVladimír Čunát <vcunat@gmail.com>2018-10-04 16:52:17 +0200
commitde93b32f902fef6243af2edcf9b2d1c28763f9d0 (patch)
treef0f2be71be2ce4a34dc11739439c9808e342886b /nixos/modules/installer
parent0a7e258012b60cbe530a756f09a4f2516786d370 (diff)
downloadnixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar.gz
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar.bz2
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar.lz
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar.xz
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.tar.zst
nixlib-de93b32f902fef6243af2edcf9b2d1c28763f9d0.zip
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.
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-option.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/installer/tools/nixos-option.sh b/nixos/modules/installer/tools/nixos-option.sh
index 3f1e591b97b0..327e3e6989f7 100644
--- a/nixos/modules/installer/tools/nixos-option.sh
+++ b/nixos/modules/installer/tools/nixos-option.sh
@@ -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