1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

unison: fix escaping of arguments

The `ExecStart=` option of systemd must take arguments fully quoted.
That is,

    "-sshargs=-i somekey"

and not

    -ssargs="-i somekey"

Additionally, inside arguments passed to unison, `=` characters must
be quoted. After unquotation by systemd, one must have

    -sshargs=-o Foo\=4

instead of

    -sshargs=-o Foo=4
This commit is contained in:
Symphorien Gibol 2020-09-17 12:00:00 +00:00 committed by Robert Helgesson
parent 472ca211ca
commit 92c682cd10
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -60,7 +60,7 @@ let
}; };
}; };
serialiseArg = key: val: "-${key}=${escapeShellArg val}"; serialiseArg = key: val: escapeShellArg "-${key}=${escape [ "=" ] val}";
serialiseArgs = args: concatStringsSep " " (mapAttrsToList serialiseArg args); serialiseArgs = args: concatStringsSep " " (mapAttrsToList serialiseArg args);