Merge pull request #536 from phile314-fh/master

[ Fix #531 ] Trim github pr plugin store paths.
This commit is contained in:
Eelco Dolstra 2018-02-12 18:05:03 +01:00 committed by GitHub
commit 028ecf7c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) };
}