File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,8 @@ auto OptionsParser<Options>::Convert(
188188 return OptionInfo{original.type ,
189189 Convert (original.field , get_child),
190190 original.env_setting ,
191- original.help_text };
191+ original.help_text ,
192+ original.default_is_true };
192193}
193194
194195template <typename Options>
@@ -402,6 +403,13 @@ void OptionsParser<Options>::Parse(
402403 }
403404
404405 const OptionInfo& info = it->second ;
406+
407+ // Some V8 options can be negated and they are validated by V8 later.
408+ if (is_negation && info.type != kBoolean && info.type != kV8Option ) {
409+ errors->push_back (NegationImpliesBooleanError (arg));
410+ break ;
411+ }
412+
405413 std::string value;
406414 if (info.type != kBoolean && info.type != kNoOp && info.type != kV8Option ) {
407415 if (equals_index != std::string::npos) {
@@ -428,11 +436,6 @@ void OptionsParser<Options>::Parse(
428436 }
429437 }
430438
431- // Some V8 options can be negated and they are validated by V8 later.
432- if (is_negation && info.type != kBoolean && info.type != kV8Option ) {
433- errors->push_back (NegationImpliesBooleanError (arg));
434- }
435-
436439 switch (info.type ) {
437440 case kBoolean :
438441 *Lookup<bool >(info.field , options) = !is_negation;
You can’t perform that action at this time.
0 commit comments