mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
profile: make --all exclusive
This commit is contained in:
parent
7a4d5e89d3
commit
91f068c193
2 changed files with 15 additions and 0 deletions
|
@ -554,6 +554,15 @@ public:
|
|||
throw UsageError("No packages specified.");
|
||||
}
|
||||
|
||||
if (std::find_if(_matchers.begin(), _matchers.end(), [](const Matcher & m) { return m.type == MatcherType::All; }) != _matchers.end() && _matchers.size() > 1) {
|
||||
throw UsageError("--all cannot be used with package names or regular expressions.");
|
||||
}
|
||||
|
||||
if (manifest.elements.empty()) {
|
||||
warn("There are no packages in the profile.");
|
||||
return {};
|
||||
}
|
||||
|
||||
std::set<std::string> result;
|
||||
for (auto & matcher : _matchers) {
|
||||
bool foundMatch = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue