diff --git a/skate-plugin/src/main/kotlin/com/slack/sgp/intellij/RepoAuthHotfix.kt b/skate-plugin/src/main/kotlin/com/slack/sgp/intellij/RepoAuthHotfix.kt new file mode 100644 index 000000000..8894f2304 --- /dev/null +++ b/skate-plugin/src/main/kotlin/com/slack/sgp/intellij/RepoAuthHotfix.kt @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2023 Slack Technologies, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.slack.sgp.intellij + +import com.intellij.ide.AppLifecycleListener +import com.intellij.ide.plugins.auth.PluginRepositoryAuthService +import com.intellij.openapi.components.service + +// code from: +// https://youtrack.jetbrains.com/issue/IDEA-315487/PluginRepositoryAuthProvider-is-broken-in-2022.3-making-custom-repository-authentication-impossible#focus=Comments-27-6990965.0-0 +class RepoAuthHotfix : AppLifecycleListener { + override fun appFrameCreated(commandLineArgs: MutableList) { + service() + } +} diff --git a/skate-plugin/src/main/resources/META-INF/plugin.xml b/skate-plugin/src/main/resources/META-INF/plugin.xml index b6aa9819e..48d77d027 100644 --- a/skate-plugin/src/main/resources/META-INF/plugin.xml +++ b/skate-plugin/src/main/resources/META-INF/plugin.xml @@ -35,5 +35,7 @@ + \ No newline at end of file