mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
treewide: use optionalString instead of 'then ""'
This commit is contained in:
parent
e9e3f2e736
commit
f3719756b5
53 changed files with 101 additions and 116 deletions
|
@ -210,9 +210,7 @@ in {
|
|||
|
||||
preStart =
|
||||
let replacePlugins =
|
||||
if cfg.plugins == null
|
||||
then ""
|
||||
else
|
||||
optionalString (cfg.plugins != null) (
|
||||
let pluginCmds = lib.attrsets.mapAttrsToList
|
||||
(n: v: "cp ${v} ${cfg.home}/plugins/${n}.jpi")
|
||||
cfg.plugins;
|
||||
|
@ -220,7 +218,7 @@ in {
|
|||
rm -r ${cfg.home}/plugins || true
|
||||
mkdir -p ${cfg.home}/plugins
|
||||
${lib.strings.concatStringsSep "\n" pluginCmds}
|
||||
'';
|
||||
'');
|
||||
in ''
|
||||
rm -rf ${cfg.home}/war
|
||||
${replacePlugins}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue