Apply suggestions from code review

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Matthew Bauer 2022-02-21 10:04:04 -06:00 committed by GitHub
parent 61295b910f
commit 3cd958849b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -453,7 +453,7 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
}
if (upgradedCount == 0) {
for (auto matcher: matchers) {
for (auto & matcher : matchers) {
if (const size_t* index = std::get_if<size_t>(&matcher)){
warn("'%d' is not a valid index in profile", *index);
} else if (const Path* path = std::get_if<Path>(&matcher)){
@ -462,7 +462,7 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
warn("'%s' does not match any packages in profile", regex->pattern);
}
}
warn ("Try `nix profile list` to see the current profile.");
warn ("Use 'nix profile list' to see the current profile.");
}
store->buildPaths(pathsToBuild);