Skip to content

fix(jetbrains): prefer dataDirectoryName for plugin path#1146

Merged
svarlamov merged 1 commit into
git-ai-project:mainfrom
peckfly:codex/jetbrains-datadir-fix
Apr 20, 2026
Merged

fix(jetbrains): prefer dataDirectoryName for plugin path#1146
svarlamov merged 1 commit into
git-ai-project:mainfrom
peckfly:codex/jetbrains-datadir-fix

Conversation

@peckfly
Copy link
Copy Markdown
Contributor

@peckfly peckfly commented Apr 19, 2026

Summary

  • prefer dataDirectoryName from product-info.json when resolving JetBrains plugin directories
  • keep the existing product/build-based path derivation as a fallback
  • add tests covering both the preferred and fallback behaviors

Why

Some JetBrains IDEs use a data directory name that does not match the path derived from productCode + buildNumber. In those cases, the plugin can be installed into the wrong directory.

Testing

  • cargo test mdm::jetbrains::detection::tests:: -- --nocapture
  • cargo fmt -- --check

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 19, 2026

CLA assistant check
All committers have signed the CLA.

@peckfly peckfly marked this pull request as ready for review April 19, 2026 10:36
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@svarlamov
Copy link
Copy Markdown
Member

Thanks for the contribution @peckfly! What behavior/bug is this fixing?

@peckfly
Copy link
Copy Markdown
Contributor Author

peckfly commented Apr 20, 2026

Thanks for the contribution @peckfly! What behavior/bug is this fixing?

This fixes JetBrains plugin installation/detection on IDEs where the actual config/plugins directory is defined by dataDirectoryName in product-info.json, but the current code derives the directory from productCode + buildNumber.

For example, on IntelliJ IDEA 2026.1, product-info.json reports dataDirectoryName=IntelliJIdea2026.1, while the current logic derives IU2026.1. That causes git-ai to look in / install into the wrong plugins directory, so the plugin may appear missing or not get loaded by the IDE.

This change prefers dataDirectoryName when available, and falls back to the existing productCode + buildNumber behavior otherwise.

@svarlamov
Copy link
Copy Markdown
Member

Great context, thank you for the contribution! Looking forward to more! 🙏

@svarlamov svarlamov merged commit 2c76ae3 into git-ai-project:main Apr 20, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants