forked from lix-project/hydra
Die tabs die
This commit is contained in:
parent
9e664cf8b0
commit
a2dc92d871
|
@ -291,28 +291,28 @@ sub inputsToArgs {
|
||||||
if scalar @{$inputInfo->{$input}} == 1
|
if scalar @{$inputInfo->{$input}} == 1
|
||||||
&& defined $inputInfo->{$input}->[0]->{storePath};
|
&& defined $inputInfo->{$input}->[0]->{storePath};
|
||||||
foreach my $alt (@{$inputInfo->{$input}}) {
|
foreach my $alt (@{$inputInfo->{$input}}) {
|
||||||
if ($alt->{type} eq "string") {
|
if ($alt->{type} eq "string") {
|
||||||
push @res, "--argstr", $input, $alt->{value};
|
push @res, "--argstr", $input, $alt->{value};
|
||||||
}
|
}
|
||||||
elsif ($alt->{type} eq "boolean") {
|
elsif ($alt->{type} eq "boolean") {
|
||||||
push @res, "--arg", $input, booleanToString($exprType, $alt->{value});
|
push @res, "--arg", $input, booleanToString($exprType, $alt->{value});
|
||||||
}
|
}
|
||||||
elsif ($alt->{type} eq "nix") {
|
elsif ($alt->{type} eq "nix") {
|
||||||
die "input type ‘nix’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
|
die "input type ‘nix’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
|
||||||
push @res, "--arg", $input, $alt->{value};
|
push @res, "--arg", $input, $alt->{value};
|
||||||
}
|
}
|
||||||
elsif ($alt->{type} eq "eval") {
|
elsif ($alt->{type} eq "eval") {
|
||||||
die "input type ‘eval’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
|
die "input type ‘eval’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
|
||||||
my $s = "{ ";
|
my $s = "{ ";
|
||||||
# FIXME: escape $_. But dots should not be escaped.
|
# FIXME: escape $_. But dots should not be escaped.
|
||||||
$s .= "$_ = builtins.storePath ${\$alt->{jobs}->{$_}}; "
|
$s .= "$_ = builtins.storePath ${\$alt->{jobs}->{$_}}; "
|
||||||
foreach keys %{$alt->{jobs}};
|
foreach keys %{$alt->{jobs}};
|
||||||
$s .= "}";
|
$s .= "}";
|
||||||
push @res, "--arg", $input, $s;
|
push @res, "--arg", $input, $s;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
push @res, "--arg", $input, buildInputToString($exprType, $alt);
|
push @res, "--arg", $input, buildInputToString($exprType, $alt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue