function RunCommand.bool_flag
The tri-state of boolean
--name for command: True for --name / --name=true, False for --noname / --name=false, None if unset. The caller owns the default when None (e.g. --enable_bzlmod defaults on for Bazel 7+).
function RunCommand.expand
Expand all
--config= flags for command into the fully-resolved flag list, compatible with ctx.bazel.build(flags=...).
Version-gated options are filtered to the run command’s resolved Bazel
version (same as flag_value / resolve_for_command), so the result
reflects what Bazel actually receives — an option gated to a different
version is dropped rather than reported as active.
function RunCommand.expand_all
Expand
--config= flags for command, split into (startup_flags, flags) where common-section options are rendered as --default_override=0:common=... startup-side entries.
Like expand, the command flags are filtered to the resolved Bazel
version so version-gated options report accurately.
function RunCommand.flag_value
The effective value of
--name for command, or None if unset. Last-write-wins over the config-expanded options; matches --name=VALUE and the two-token --name VALUE form. version overrides the Bazel version used for version-gated options.
function RunCommand.flag_values
All values of a repeatable
--name option for command, in order — for flags that legitimately accumulate (--aspects, --output_groups, …).
function RunCommand.merge
Overlay
other on top of this run command, returning a new one. other wins on conflicts (its options apply after this one’s under last-write-wins); startup flags, --config skip policy, and version are merged with other taking precedence when set. Neither input is mutated.
function RunCommand.options_for
Options applicable to
command without expanding --config=. Each item is a str or a (flag, version_condition) tuple.
function RunCommand.sources
The source file paths that were loaded.
function RunCommand.startup_flags
The startup flags Bazel runs with under this run command: the user startup flags + the rc-file
startup section + --ignore_all_rc_files.
