Skip to content

Commit

Permalink
Fix turbine command lines with empty javacopts
Browse files Browse the repository at this point in the history
See #4422

PiperOrigin-RevId: 181497117
  • Loading branch information
cushon authored and Copybara-Service committed Jan 10, 2018
1 parent f6ca788 commit 22ccdd1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,11 @@ private CustomCommandLine.Builder baseCommandLine(
result.addExecPaths("--source_jars", ImmutableList.copyOf(sourceJars));
}

result.addAll("--javacopts", javacOpts);
// terminate --javacopts with `--` to support javac flags that start with `--`
result.add("--");
if (!javacOpts.isEmpty()) {
result.addAll("--javacopts", javacOpts);
// terminate --javacopts with `--` to support javac flags that start with `--`
result.add("--");
}

if (ruleKind != null) {
result.add("--rule_kind", ruleKind);
Expand Down

0 comments on commit 22ccdd1

Please sign in to comment.