From 570aed4b46916551da969c4daeef0322461ac2fe Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 23 Feb 2019 18:06:51 +0000 Subject: lib: add `showWarnings` --- nixos/modules/system/activation/top-level.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nixos/modules/system/activation') diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index a560af5ce96d..5c88d27b6c65 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -130,11 +130,9 @@ let failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions); - showWarnings = res: fold (w: x: builtins.trace "warning: ${w}" x) res config.warnings; - baseSystemAssertWarn = if failedAssertions != [] then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" - else showWarnings baseSystem; + else showWarnings config.warnings baseSystem; # Replace runtime dependencies system = fold ({ oldDependency, newDependency }: drv: -- cgit 1.4.1