diff --git a/lib/cli/repositoryobjectcommand.cpp b/lib/cli/repositoryobjectcommand.cpp index 6924dccdf..444d9e9fa 100644 --- a/lib/cli/repositoryobjectcommand.cpp +++ b/lib/cli/repositoryobjectcommand.cpp @@ -119,8 +119,10 @@ String RepositoryObjectCommand::GetShortDescription(void) const void RepositoryObjectCommand::InitParameters(boost::program_options::options_description& visibleDesc, boost::program_options::options_description& hiddenDesc) const { - visibleDesc.add_options() - ("import", po::value >(), "Import the defined template(s) into the object. Must be defined and included separately in Icinga 2"); + if (m_Command == RepositoryCommandAdd) { + visibleDesc.add_options() + ("import", po::value >(), "Import the defined template(s) into the object. Must be defined and included separately in Icinga 2"); + } } std::vector RepositoryObjectCommand::GetPositionalSuggestions(const String& word) const