about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix/command.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc
index e88c834abc50..f90d848f2a40 100644
--- a/src/nix/command.cc
+++ b/src/nix/command.cc
@@ -50,8 +50,11 @@ void MultiCommand::printHelp(const string & programName, std::ostream & out)
     out << "Available commands:\n";
 
     Table2 table;
-    for (auto & command : commands)
-        table.push_back(std::make_pair(command.second->name(), command.second->description()));
+    for (auto & command : commands) {
+        auto descr = command.second->description();
+        if (!descr.empty())
+            table.push_back(std::make_pair(command.second->name(), descr));
+    }
     printTable(out, table);
 
     out << "\n";