File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,21 @@ object ScoverageSbtPlugin extends AutoPlugin {
120
120
}
121
121
122
122
private lazy val scoverageScalacOptions = Def .task {
123
- val scoverageDeps : Seq [File ] = update.value matching configurationFilter(" provided" )
124
- scoverageDeps.find(_.getAbsolutePath.contains(ScalacPluginArtifact )) match {
125
- case None => throw new Exception (s " Fatal: $ScalacPluginArtifact not in libraryDependencies " )
126
- case Some (pluginPath) =>
127
- scalaArgs(coverageEnabled.value,
128
- pluginPath,
129
- crossTarget.value,
130
- coverageExcludedPackages.value,
131
- coverageExcludedFiles.value,
132
- coverageHighlighting.value)
123
+ val isEnabled = coverageEnabled.value
124
+ if (isEnabled) {
125
+ val scoverageDeps : Seq [File ] = update.value matching configurationFilter(" provided" )
126
+ scoverageDeps.find(_.getAbsolutePath.contains(ScalacPluginArtifact )) match {
127
+ case None => throw new Exception (s " Fatal: $ScalacPluginArtifact not in libraryDependencies " )
128
+ case Some (pluginPath) =>
129
+ scalaArgs(coverageEnabled.value,
130
+ pluginPath,
131
+ crossTarget.value,
132
+ coverageExcludedPackages.value,
133
+ coverageExcludedFiles.value,
134
+ coverageHighlighting.value)
135
+ }
136
+ } else {
137
+ Seq ()
133
138
}
134
139
}
135
140
You can’t perform that action at this time.
0 commit comments