Commit a06dcdba authored by Brad King's avatar Brad King
Browse files

ENH: Allow LIST(APPEND) command to append nothing.

parent a5ac3161
......@@ -179,12 +179,18 @@ bool cmListCommand::HandleGetCommand(std::vector<std::string> const& args)
//----------------------------------------------------------------------------
bool cmListCommand::HandleAppendCommand(std::vector<std::string> const& args)
{
if(args.size() < 3)
if(args.size() < 2)
{
this->SetError("sub-command APPEND requires at least two arguments.");
this->SetError("sub-command APPEND requires at least one argument.");
return false;
}
// Skip if nothing to append.
if(args.size() < 3)
{
return true;
}
const std::string& listName = args[1];
// expand the variable
std::string listString;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment