From 6aac14a46d44dd0956a9fc3e7e94dbbacd54d5d8 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Wed, 25 Apr 2018 06:56:28 +0100 Subject: [PATCH] buildkite-agent: fix variable expansion in hook scripts @cleverca found this bug in the declarative hooks config. Any shell variables referenced in a hook script would get expanded by the hooks directory builder. Prevent variable expansion by quoting the here doc limit string. --- modules/services/buildkite-agent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/buildkite-agent.nix b/modules/services/buildkite-agent.nix index 96c2f3b3..1438eeef 100644 --- a/modules/services/buildkite-agent.nix +++ b/modules/services/buildkite-agent.nix @@ -17,7 +17,7 @@ let hooksDir = let mkHookEntry = name: value: '' - cat > $out/${name} < $out/${name} <<'EOF' #! ${pkgs.stdenv.shell} set -e ${value}