Skip to content

Commit

Permalink
🐛 Fix native distributions versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed May 14, 2024
1 parent 69fe823 commit 30c15cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/installers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (
releaseVer = "release"
eapVer = "eap"
versionsMap = map[string]string{
releaseVer: "2023.3",
releaseVer: "2024.1",
eapVer: "2024.1",
}
Products = map[string]string{
Expand Down
14 changes: 14 additions & 0 deletions core/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func prepareHost(opts *QodanaOptions) {
spinner.ShowTimer = false // We will update interactive spinner
}
opts.Ide = downloadAndInstallIDE(opts, opts.GetQodanaSystemDir(), spinner)
fixWindowsPlugins(opts.Ide)
}, fmt.Sprintf("Downloading %s", opts.Ide), fmt.Sprintf("downloading IDE distribution to %s", opts.GetQodanaSystemDir()))
} else {
val, exists := os.LookupEnv(platform.QodanaDistEnv)
Expand All @@ -147,6 +148,19 @@ func prepareHost(opts *QodanaOptions) {
}
}

// fixWindowsPlugins quick-fix for Windows 241 distributions
func fixWindowsPlugins(ideDir string) {
if runtime.GOOS == "windows" && strings.Contains(ideDir, "241") {
pluginsClasspath := filepath.Join(ideDir, "plugins", "plugin-classpath.txt")
if _, err := os.Stat(pluginsClasspath); err == nil {
err = os.Remove(pluginsClasspath)
if err != nil {
log.Warnf("Failed to remove plugin-classpath.txt: %v", err)
}
}
}
}

// IsHomeDirectory returns true if the given path is the user's home directory.
func IsHomeDirectory(path string) bool {
absPath, err := filepath.Abs(path)
Expand Down

0 comments on commit 30c15cb

Please sign in to comment.