Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resolve PATH environment issue in FuzzyGrep.runCommand #106

Closed
wants to merge 1 commit into from

Conversation

gymynnym
Copy link

@gymynnym gymynnym commented Mar 3, 2025

In FuzzyGrep.runCommand, the test environment (e.g., runIde) applies the PATH variable normally, allowing tests to succeed without issues. However, in the actual built plugin, the PATH is limited to basic values such as /usr/bin, which means commands like rg (installed via Homebrew) are not recognized.

To address this, the command execution method was changed from ProcessBuilder to GeneralCommandLine so that IntelliJ properly inherits the PATH environment as described here:
https://stackoverflow.com/questions/78851077/intellij-plugin-deficient-path-environment-variable

  • Switched from ProcessBuilder to GeneralCommandLine to ensure proper PATH inheritance in IntelliJ plugins.

* Switched from `ProcessBuilder` to `GeneralCommandLine` to ensure proper PATH inheritance in IntelliJ plugins.
@MituuZ
Copy link
Owner

MituuZ commented Mar 3, 2025

Hey, thanks for the PR!

I'll verify that this works as expected and get back to you

@MituuZ MituuZ self-requested a review March 3, 2025 10:45
@MituuZ
Copy link
Owner

MituuZ commented Mar 3, 2025

Awesome! Thanks for verifying

I'll include this in the next release

@gymynnym do you mind if I include a shout-out for you in the release notes?

@gymynnym
Copy link
Author

gymynnym commented Mar 3, 2025

Of course! It has been a good experience thanks to you.
Have a great day!

@MituuZ
Copy link
Owner

MituuZ commented Mar 4, 2025

@gymynnym

I'll close this one and merge it in #108 instead. I included some cleanup and added popup title updates to indicate which command is running

Uploaded a preview version of the changes to the marketplace. Gonna run it for a day or two before the actual release

@MituuZ MituuZ closed this Mar 4, 2025
@gymynnym gymynnym deleted the fix branch March 4, 2025 07:12
@gymynnym gymynnym restored the fix branch March 4, 2025 07:13
@gymynnym gymynnym deleted the fix branch March 4, 2025 07:13
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.

2 participants