From 08e98e2e632a4b9db9568799f2b36aea345dc36d Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 15 Nov 2022 01:06:03 +0100 Subject: lib/shell: add optional print functions --- lib/mk-sandbox-system.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/mk-sandbox-system.nix') diff --git a/lib/mk-sandbox-system.nix b/lib/mk-sandbox-system.nix index b678399..56ccad1 100644 --- a/lib/mk-sandbox-system.nix +++ b/lib/mk-sandbox-system.nix @@ -55,8 +55,8 @@ in rec { # TODO: also print a summary of the host mount points # TODO: also print a summary of the forwarded ports interactiveShellInit = lib.mkBefore '' - ${lib.optionalString (envVars != {}) (shellLib.printEnvVars envVars)} - ${lib.optionalString (tools != []) (shellLib.printBins tools)} + ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars} + ${shellLib.ifSomeList tools shellLib.printBins} echo ''; }; -- cgit v1.2.3