ConstructFlag class sealed
A command-line flag understood by both the outer revali CLI and the
inner construct runner that executes inside the generated entrypoint.
Each shared flag is declared exactly once — here — and both parsers are built from the same list. The two commands used to declare their flags independently, and the outer command forwarded them by filtering the raw argument strings. That had two problems this design removes structurally:
--flag=valueis a single token, so it never matched the--flagthe filter looked for.revali dev --cert=a.pemleaked--cert=a.peminto the inner parser, which does not declarecert, and failed to parse.- Every new flag was a three-place edit: declare inner, declare outer, and update the outer-only strip list. Missing the third leaked the flag.
forward emits from parsed results rather than raw strings, so a flag absent from the shared list cannot reach the inner runner at all.
- Implementers
Properties
Methods
-
declare(
ArgParser parser) → void -
Adds this flag to
parser. Called for both the outer and inner command. -
forward(
ArgResults results, List< String> out) → void -
Appends this flag to
outif it was explicitly passed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited