diff options
author | 2016-03-22 17:04:09 +0000 | |
---|---|---|
committer | 2016-03-23 12:19:49 +0000 | |
commit | 044adedc70de040475443e52eb1a3c692159790e (patch) | |
tree | b2de6881eff90d0b07772ded5db4e7a3f1c9f465 /src/main/java/com | |
parent | cd6ca1d7a8bf947eb7c68a82ec2f1c0512d18169 (diff) |
Make client-provided options an rc source
The client provides information about whether the terminal is a tty, and
which width the output should be formatted for. Passing this information
as explicit command-line arguments has the disadvantage that it overrides
any setting in configuration files. While usually there is no one-size-fits-all
value for terminal width, it doesn't make sense either to have an option
where the user cannot set a default. Fix this by providing the client options
as least imported rc-source.
--
Change-Id: Iad9eddbb3ff1777f4b423053e21aeac9fd7c466f
Reviewed-on: https://bazel-review.googlesource.com/#/c/3092
MOS_MIGRATED_REVID=117833645
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java index 38021d518a..76b182af4f 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java @@ -477,9 +477,10 @@ public class BlazeCommandDispatcher { throws OptionsParsingException { if (!rcfileOptions.isEmpty()) { String inherited = commandToParse.equals(originalCommand) ? "" : "Inherited "; - rcfileNotes.add("Reading options for '" + originalCommand + - "' from " + rcfile + ":\n" + - " " + inherited + "'" + commandToParse + "' options: " + String source = rcfile.equals("client") ? "Options provided by the client" + : "Reading options for '" + originalCommand + "' from " + rcfile; + rcfileNotes.add(source + ":\n" + + " " + inherited + "'" + commandToParse + "' options: " + Joiner.on(' ').join(rcfileOptions)); optionsParser.parse(OptionPriority.RC_FILE, rcfile, rcfileOptions); } |