1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-29 01:37:28 +02:00

home-environment: generate checked activation script

By using `writeShellScript` when writing the activation script we
automatically get the right shebang and also get syntax validation.

Issue #2015
This commit is contained in:
Robert Helgesson 2021-05-18 00:18:57 +02:00
parent b0688a631b
commit 794d08a1d8
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -541,9 +541,7 @@ in
] ]
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH"; + optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
activationScript = pkgs.writeScript "activation-script" '' activationScript = pkgs.writeShellScript "activation-script" ''
#!${pkgs.runtimeShell}
set -eu set -eu
set -o pipefail set -o pipefail