@@ -586,7 +586,7 @@ fn parseArgsCtx(
586586 val_idx += 1 ;
587587 try val .setArgIdx (parse_ctx .arg_idx );
588588 parse_ctx .* .arg_idx += 1 ;
589- log .debug ("Parsed Value '{s}'." , .{ val .name () });
589+ log .debug ("Parsed Value ({d}:{d}) '{s}'." , .{ val_idx , val . entryIdx (), val .name () });
590590 continue :parseArg ;
591591 }
592592 }
@@ -652,10 +652,11 @@ fn parseArgsCtx(
652652 if (! parse_ctx .usage_help_flag ) //
653653 parse_ctx .* .usage_help_flag = (cmd .checkFlag ("help" ) or cmd .checkFlag ("usage" ));
654654 if ( //
655+ ! parse_ctx .usage_help_flag and //
655656 cmd .vals_mandatory and //
656657 cmd .vals != null and //
657658 val_idx < cmd .vals .? .len and //
658- ! parse_ctx . usage_help_flag //
659+ ! cmd . vals .? [ 0 ]. isSet () //
659660 ) {
660661 log .err ("Command '{s}' expects {d} Value(s), but received {d}." , .{
661662 cmd .name ,
@@ -677,11 +678,11 @@ fn parseOpt(args: *ArgIteratorGeneric, comptime OptionType: type, opt: *const Op
677678 if (peek_arg == null or peek_arg .? [0 ] == '-' ) {
678679 if (! (mem .eql (u8 , opt .val .childType (), "bool" ))) {
679680 if (opt .allow_empty ) {
680- opt .val .setEmpty () catch
681+ opt .val .setEmpty () catch //
681682 log .err ("The Option '{s}' has already been set." , .{ opt .name });
682683 return ;
683- }
684- else if (! opt .val .hasCustomParseFn ())
684+ } //
685+ else if (! opt .val .hasCustomParseFn ()) //
685686 return error .EmptyArgumentProvidedToOption ;
686687 }
687688 _ = args .next ();
0 commit comments