1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-01 04:23:34 +02:00

vdirsyncer: set postHook to null when not set

The `postHook` option was being processed and reset to a string, even if
the user set it to null, causing issues under certain conditions (see

Using `if-then-else` instead of `optionalString` keeps the option as
null, instead of setting it to an empty string.
This commit is contained in:
Felipe Silva 2024-04-18 23:13:28 -03:00
parent ff1c364654
commit 33e79dd771
No known key found for this signature in database
GPG Key ID: DFCE681E1B7974D8

View File

@ -26,9 +26,11 @@ let
filterAttrs (_: v: v != null)
((getAttrs [ "type" "fileExt" "encoding" ] a.local) // {
path = a.local.path;
postHook = optionalString (a.vdirsyncer.postHook != null)
postHook = if a.vdirsyncer.postHook != null then
(pkgs.writeShellScriptBin "post-hook" a.vdirsyncer.postHook
+ "/bin/post-hook");
+ "/bin/post-hook")
else
null;
});
remoteStorage = a: