Skip to content

Commit

Permalink
Mark --blazerc as allows_multiple in flag docs
Browse files Browse the repository at this point in the history
Fixes bazelbuild#24730

Closes bazelbuild#24735.

PiperOrigin-RevId: 713606521
Change-Id: If8578fcdfc30dcbfb6af283089614f3364eb30d8
  • Loading branch information
fmeum authored and copybara-github committed Jan 9, 2025
1 parent 293be8a commit e78bab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionEffectTag;
import com.google.devtools.common.options.OptionsBase;
import java.util.List;

/** Provides Bazel startup flags. */
public class BazelStartupOptionsModule extends BlazeModule {
/** Bazelrc file flags. */
public static final class Options extends OptionsBase {
@Option(
name = "bazelrc",
allowMultiple = true,
defaultValue = "null", // NOTE: purely decorative, rc files are read by the client.
documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
Expand All @@ -45,7 +47,7 @@ public static final class Options extends OptionsBase {
+ "the following two locations: the workspace directory, then the user's home "
+ "directory.\n"
+ "Note: command line options will always supersede any option in bazelrc.")
public String blazerc;
public List<String> blazerc;

// For the system_rc, it can be /etc/bazel.bazelrc, or a special Windows value, or can be
// custom-set by the Bazel distributor. We don't list a known path in the help output in order
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/integration/startup_options_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function test_autodetect_server_javabase() {
# Below are the regression tests for Issue #7489
function test_multiple_bazelrc_later_overwrites_earlier() {
# Help message only visible with --help_verbosity=medium
help_message_in_description="--${PRODUCT_NAME}rc (a string; default: see description)"
help_message_in_description="--${PRODUCT_NAME}rc (a string; may be used multiple times)"

echo "help --help_verbosity=short" > 1.rc
echo "help --help_verbosity=medium" > 2.rc
Expand Down

0 comments on commit e78bab5

Please sign in to comment.