Skip to content

Commit

Permalink
Fix for getHeaderField("Location") must not be null #960
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed Apr 26, 2022
1 parent 784a810 commit 8e776a3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/main/kotlin/org/jetbrains/intellij/IntelliJPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,17 @@ open class IntelliJPlugin : Plugin<Project> {
if (project.gradle.startParameter.isOffline) {
return
}
val version = getVersion()?.let(Version::parse) ?: Version()
val latestVersion = LatestVersionResolver.fromGitHub(IntelliJPluginConstants.NAME, IntelliJPluginConstants.GITHUB_REPOSITORY)
if (version < Version.parse(latestVersion)) {
warn(
context,
"${IntelliJPluginConstants.NAME} is outdated: $version. Update `${IntelliJPluginConstants.ID}` to: $latestVersion"
)
try {
val version = getVersion()?.let(Version::parse) ?: Version()
val latestVersion = LatestVersionResolver.fromGitHub(IntelliJPluginConstants.NAME, IntelliJPluginConstants.GITHUB_REPOSITORY)
if (version < Version.parse(latestVersion)) {
warn(
context,
"${IntelliJPluginConstants.NAME} is outdated: $version. Update `${IntelliJPluginConstants.ID}` to: $latestVersion"
)
}
} catch (e: Exception) {
error(context, e.message.orEmpty(), e)
}
}

Expand Down

0 comments on commit 8e776a3

Please sign in to comment.