Skip to content

Commit e78bab5

Browse files
fmeumcopybara-github
authored andcommitted
Mark --blazerc as allows_multiple in flag docs
Fixes #24730 Closes #24735. PiperOrigin-RevId: 713606521 Change-Id: If8578fcdfc30dcbfb6af283089614f3364eb30d8
1 parent 293be8a commit e78bab5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/google/devtools/build/lib/bazel/BazelStartupOptionsModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919
import com.google.devtools.common.options.OptionDocumentationCategory;
2020
import com.google.devtools.common.options.OptionEffectTag;
2121
import com.google.devtools.common.options.OptionsBase;
22+
import java.util.List;
2223

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

5052
// For the system_rc, it can be /etc/bazel.bazelrc, or a special Windows value, or can be
5153
// custom-set by the Bazel distributor. We don't list a known path in the help output in order

src/test/shell/integration/startup_options_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function test_autodetect_server_javabase() {
8080
# Below are the regression tests for Issue #7489
8181
function test_multiple_bazelrc_later_overwrites_earlier() {
8282
# Help message only visible with --help_verbosity=medium
83-
help_message_in_description="--${PRODUCT_NAME}rc (a string; default: see description)"
83+
help_message_in_description="--${PRODUCT_NAME}rc (a string; may be used multiple times)"
8484

8585
echo "help --help_verbosity=short" > 1.rc
8686
echo "help --help_verbosity=medium" > 2.rc

0 commit comments

Comments
 (0)