[run targets] coverage: do not try to download reports if run confguration is not target-aware

This fixes coverage support for Kotlin configurations, which are executed with the target-aware runner but are not target-aware themselves.

GitOrigin-RevId: 5435b8906d44d303f0f63be5ea074d4ab1d155d6
This commit is contained in:
Aleksander Kuznetsov
2021-03-22 15:37:55 +00:00
committed by intellij-monorepo-bot
parent 86073c5c9c
commit 21f09b3503
@@ -61,7 +61,7 @@ public class CoverageJavaRunConfigurationExtension extends RunConfigurationExten
@Override
public void attachToProcess(@NotNull final RunConfigurationBase configuration, @NotNull ProcessHandler handler, RunnerSettings runnerSettings) {
if (myTargetDependentParameters.getTargetEnvironment() == null) {
if (myTargetDependentParameters.getTargetEnvironment() == null || !(configuration instanceof TargetEnvironmentAwareRunProfile)) {
CoverageDataManager.getInstance(configuration.getProject()).attachToProcess(handler, configuration, runnerSettings);
return;
}