Actually allow external repo targets in run configurations
@@ -44,7 +44,6 @@ import com.google.idea.blaze.base.run.targetfinder.TargetFinder;
import com.google.idea.blaze.base.settings.Blaze;
import com.google.idea.blaze.base.settings.BlazeImportSettings;
import com.google.idea.blaze.base.settings.BlazeImportSettingsManager;
-import com.google.idea.blaze.base.settings.BuildSystem;
import com.google.idea.blaze.base.sync.data.BlazeProjectDataManager;
import com.google.idea.blaze.base.sync.projectview.ImportRoots;
import com.google.idea.blaze.base.ui.UiUtil;
@@ -373,13 +372,9 @@ public class BlazeCommandRunConfiguration extends LocatableConfigurationBase
"You must specify a %s target expression.", Blaze.buildSystemName(getProject())));
}
- if (!targetPattern.startsWith("//")) {
- String errorMessage = "You must specify the full target expression, starting with //";
- if (Blaze.getBuildSystem(getProject()) == BuildSystem.Bazel
- && !targetPattern.startsWith("@")) {
- errorMessage = "You must specify the full target expression, starting with // or @";
- }
- throw new RuntimeConfigurationError(errorMessage);
+ if (!targetPattern.startsWith("//") && !targetPattern.startsWith("@")) {
+ throw new RuntimeConfigurationError(
+ "You must specify the full target expression, starting with // or @");
}
String error = TargetExpression.validate(targetPattern);
