diff options
author | ccalvarin <ccalvarin@google.com> | 2017-04-15 05:19:09 +0200 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2017-04-18 11:28:49 +0200 |
commit | ae1d0dec94e4f4b7066ce1c65d4f035907540586 (patch) | |
tree | be61e49bcfe9eb2fbc6ad69ee47726a5711af6e7 /src/main/java/com/google/devtools/common/options/OptionsParser.java | |
parent | f1e1773a17bb53758dda66188f859e999098e594 (diff) |
Fix an expansion flag issue where it expands to a repeatable flag.
There's no reason an expansion flag should not expand to multiple values for a repeatable flag (a flag with allowMultiple set to true.) If this expansion flag is set in a SetValue policy, group its repeatable subflags into a single SetValue per subflag.
For an overridable SetValue policy on an expansion, any repeatable flag that it expands to should append its value, and not override the user's original values.
PiperOrigin-RevId: 153233784
Diffstat (limited to 'src/main/java/com/google/devtools/common/options/OptionsParser.java')
-rw-r--r-- | src/main/java/com/google/devtools/common/options/OptionsParser.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/common/options/OptionsParser.java b/src/main/java/com/google/devtools/common/options/OptionsParser.java index eaa1e81065..b9a078e350 100644 --- a/src/main/java/com/google/devtools/common/options/OptionsParser.java +++ b/src/main/java/com/google/devtools/common/options/OptionsParser.java @@ -372,6 +372,10 @@ public class OptionsParser implements OptionsProvider { return expandedFrom != null; } + public boolean getAllowMultiple() { + return allowMultiple; + } + @Override public String toString() { StringBuilder result = new StringBuilder(); |