aboutsummaryrefslogtreecommitdiff
path: root/paludis/args/args_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/args/args_handler.cc')
-rw-r--r--paludis/args/args_handler.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/paludis/args/args_handler.cc b/paludis/args/args_handler.cc
index 3ebe99808..afb3966d5 100644
--- a/paludis/args/args_handler.cc
+++ b/paludis/args/args_handler.cc
@@ -232,6 +232,8 @@ ArgsHandler::run(
it = _imp->longopts.find(arg);
if (it == _imp->longopts.end())
throw BadArgument("--no-" + arg);
+ if (! it->second->can_be_negated())
+ throw BadArgument("--no-" + arg);
std::string remaining_chars;
ArgsVisitor visitor(&argit, arge, env_prefix, remaining_chars, true, specifiedness);