Skip to content

Commit

Permalink
Add PluginRepositoryAuthService fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Katherine Liu committed Jul 31, 2023
1 parent ccc30bd commit 6ad6838
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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<String>) {
service<PluginRepositoryAuthService>()
}
}
2 changes: 2 additions & 0 deletions skate-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@
<applicationListeners>
<listener class="com.slack.sgp.intellij.ProjectOpenCloseListener"
topic="com.intellij.openapi.project.ProjectManagerListener"/>
<listener class="com.slack.sgp.intellij.RepoAuthHotfix"
topic="com.intellij.ide.AppLifecycleListener"/>
</applicationListeners>
</idea-plugin>

0 comments on commit 6ad6838

Please sign in to comment.