forked from lix-project/hydra
[ 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.
This commit is contained in:
parent
ae080615d1
commit
3cf2ffe367
|
@ -56,8 +56,8 @@ sub fetchInput {
|
||||||
print $fh encode_json \%pulls;
|
print $fh encode_json \%pulls;
|
||||||
close $fh;
|
close $fh;
|
||||||
system("jq -S . < $filename > $tempdir/github-pulls-sorted.json");
|
system("jq -S . < $filename > $tempdir/github-pulls-sorted.json");
|
||||||
my $storePath = `nix-store --add "$tempdir/github-pulls-sorted.json"`
|
my $storePath = trim(`nix-store --add "$tempdir/github-pulls-sorted.json"`
|
||||||
or die "cannot copy path $filename to the Nix store.\n";
|
or die "cannot copy path $filename to the Nix store.\n");
|
||||||
my $timestamp = time;
|
my $timestamp = time;
|
||||||
return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) };
|
return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue