From 044adedc70de040475443e52eb1a3c692159790e Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 22 Mar 2016 17:04:09 +0000 Subject: 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 --- .../google/devtools/build/lib/runtime/BlazeCommandDispatcher.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com') 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); } -- cgit v1.2.3