mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-31 15:36:47 +02:00
dropEmptyInitThenConcatStringsSep -> concatStringSep: output name empty not feasible
I don't think it's completely impossible, but I can't construct one easily as derivationStrict seems to (re)tokenize the outputs attribute, dropping the empty output. It's not a scenario we have to account for here.
This commit is contained in:
parent
d3e49ac881
commit
49d100ba8b
3 changed files with 7 additions and 4 deletions
|
@ -1505,7 +1505,7 @@ std::pair<bool, SingleDrvOutputs> DerivationGoal::checkPathValidity()
|
||||||
if (!wantedOutputsLeft.empty())
|
if (!wantedOutputsLeft.empty())
|
||||||
throw Error("derivation '%s' does not have wanted outputs %s",
|
throw Error("derivation '%s' does not have wanted outputs %s",
|
||||||
worker.store.printStorePath(drvPath),
|
worker.store.printStorePath(drvPath),
|
||||||
dropEmptyInitThenConcatStringsSep(", ", quoteStrings(wantedOutputsLeft)));
|
concatStringsSep(", ", quoteStrings(wantedOutputsLeft)));
|
||||||
|
|
||||||
bool allValid = true;
|
bool allValid = true;
|
||||||
for (auto & [_, status] : initialOutputs) {
|
for (auto & [_, status] : initialOutputs) {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "regex-combinators.hh"
|
#include "regex-combinators.hh"
|
||||||
#include "outputs-spec.hh"
|
#include "outputs-spec.hh"
|
||||||
#include "path-regex.hh"
|
#include "path-regex.hh"
|
||||||
|
#include "strings-inline.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ std::string OutputsSpec::to_string() const
|
||||||
return "*";
|
return "*";
|
||||||
},
|
},
|
||||||
[&](const OutputsSpec::Names & outputNames) -> std::string {
|
[&](const OutputsSpec::Names & outputNames) -> std::string {
|
||||||
return dropEmptyInitThenConcatStringsSep(",", outputNames);
|
return concatStringsSep(",", outputNames);
|
||||||
},
|
},
|
||||||
}, raw);
|
}, raw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
#include <regex>
|
||||||
|
|
||||||
#include "path-with-outputs.hh"
|
#include "path-with-outputs.hh"
|
||||||
#include "store-api.hh"
|
#include "store-api.hh"
|
||||||
|
#include "strings.hh"
|
||||||
|
|
||||||
#include <regex>
|
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
@ -9,7 +11,7 @@ std::string StorePathWithOutputs::to_string(const StoreDirConfig & store) const
|
||||||
{
|
{
|
||||||
return outputs.empty()
|
return outputs.empty()
|
||||||
? store.printStorePath(path)
|
? store.printStorePath(path)
|
||||||
: store.printStorePath(path) + "!" + dropEmptyInitThenConcatStringsSep(",", outputs);
|
: store.printStorePath(path) + "!" + concatStringsSep(",", outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue