Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/nix/config-check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ struct CmdConfigCheck : StoreCommand
dirs.insert(std::filesystem::canonical(candidate).parent_path());
}

if (dirs.size() != 1) {
if (dirs.empty()) {
return checkFail("No nix-env found in PATH.");
} else if (dirs.size() > 1) {
std::ostringstream ss;
ss << "Multiple versions of nix found in PATH:\n";
for (auto & dir : dirs)
Expand Down
Loading