From 3cf2ffe3673a739e06b50a227560e344de0720d0 Mon Sep 17 00:00:00 2001 From: Philipp Hausmann Date: Mon, 12 Feb 2018 17:59:56 +0100 Subject: [PATCH] [ Fix #531 ] Trim github pr plugin store paths. nix-store --add returns a trailing LF which caused wrong include paths for the github PR plugin JSON input. --- src/lib/Hydra/Plugin/GithubPulls.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Plugin/GithubPulls.pm b/src/lib/Hydra/Plugin/GithubPulls.pm index be3ae53b..293a94c2 100644 --- a/src/lib/Hydra/Plugin/GithubPulls.pm +++ b/src/lib/Hydra/Plugin/GithubPulls.pm @@ -56,8 +56,8 @@ sub fetchInput { print $fh encode_json \%pulls; close $fh; system("jq -S . < $filename > $tempdir/github-pulls-sorted.json"); - my $storePath = `nix-store --add "$tempdir/github-pulls-sorted.json"` - or die "cannot copy path $filename to the Nix store.\n"; + my $storePath = trim(`nix-store --add "$tempdir/github-pulls-sorted.json"` + or die "cannot copy path $filename to the Nix store.\n"); my $timestamp = time; return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) }; }