Skip to content

Commit

Permalink
Add builder without mnemonics for build command
Browse files Browse the repository at this point in the history
  • Loading branch information
SocksDevil committed Apr 14, 2021
1 parent d8a3fb9 commit c0591d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.jetbrains.bsp.bazel.server.bazel;

import java.util.List;
// Mnemonics are not accepted by some commands, such as the build command, therefore they must be
// treated as arguments.

public class BazelRunnerBuilderWithoutMnemonics extends BazelRunnerBuilder {
public BazelRunnerBuilderWithoutMnemonics(BazelRunner bazelRunner, String bazelBuildCommand) {
super(bazelRunner, bazelBuildCommand);
}

@Override
public BazelRunnerBuilder withTargets(List<String> bazelTargets) {
return withArguments(bazelTargets);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public BazelRunnerBuilder aquery() {
}

public BazelRunnerBuilder build() {
return new BazelRunnerBuilder(bazelRunner, BAZEL_BUILD_COMMAND);
return new BazelRunnerBuilderWithoutMnemonics(bazelRunner, BAZEL_BUILD_COMMAND);
}

public BazelRunnerBuilder clean() {
Expand Down

0 comments on commit c0591d0

Please sign in to comment.