Feature: Extra arg detection
- Commands that do not accept filters or modifications now generate an error when extra arguments are specified.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <signal.h>
|
||||
#include <Context.h>
|
||||
#include <Filter.h>
|
||||
#include <Color.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
@@ -54,6 +55,10 @@ int CmdSync::execute (std::string& output)
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
std::stringstream out;
|
||||
|
||||
Filter filter;
|
||||
if (filter.hasFilter ())
|
||||
throw std::string (STRING_ERROR_NO_FILTER);
|
||||
|
||||
// Loog for the 'init' keyword to indicate one-time pending.data upload.
|
||||
bool first_time_init = false;
|
||||
std::vector <std::string> words = context.cli2.getWords ();
|
||||
|
||||
Reference in New Issue
Block a user