emitNegatableFlag function

void emitNegatableFlag(
  1. List<String> out,
  2. String name,
  3. bool value
)

A negatable flag, emitted explicitly in both directions.

Always explicit, because the baked-in command outlives the default that produced it: --ship-logs defaults to true today, and a service installed with --no-ship-logs must keep shipping nothing even if that default flips.

Implementation

void emitNegatableFlag(List<String> out, String name, bool value) =>
    out.add(value ? '--$name' : '--no-$name');