remove required targets for info commands
@@ -23,6 +23,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
+import com.google.idea.blaze.base.command.BlazeCommandName;
import com.google.idea.blaze.base.dependencies.TargetInfo;
import com.google.idea.blaze.base.lang.buildfile.references.LabelUtils;
import com.google.idea.blaze.base.logging.EventLoggingService;
@@ -408,16 +409,20 @@ public class BlazeCommandRunConfiguration
}
ImmutableList<String> targetPatterns = this.targetPatterns;
if (targetPatterns.isEmpty()) {
+ if (handler.getCommandName() != BlazeCommandName.INFO) {
throw new RuntimeConfigurationError(
String.format(
"You must specify a %s target expression.", Blaze.buildSystemName(getProject())));
}
+ }
for (String pattern : targetPatterns) {
+ if (handler.getCommandName() != BlazeCommandName.INFO) {
if (Strings.isNullOrEmpty(pattern)) {
throw new RuntimeConfigurationError(
String.format(
"You must specify a %s target expression.", Blaze.buildSystemName(getProject())));
}
+ }
if (!pattern.startsWith("//") && !pattern.startsWith("@")) {
throw new RuntimeConfigurationError(
"You must specify the full target expression, starting with // or @");
