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 output retrieval during Direnv import #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Chrisimx
Copy link

@Chrisimx Chrisimx commented Jan 10, 2025

In my setup the IDE always hanged forever when importing a direnv. The reason for this was that process.waitFor() != 0 doesn't work anymore as direnv only terminates after its output has been read (but the direnv output seems correct). Therefore, this line waited forever as the stdout would only have been read after this.

This PR changes the implementation to read the stdout first until the EOF and then waits for termination of the proccess with a configurable timeout, so that the IDE does not hang forever (as it does right now).

The built plugin is here (for anyone who wants to try it):
Direnv integration-0.2.10.zip
You can install it manually in the plugin settings after uninstalling the old version.

Tries to fix #11

- Add settings option for configuring timeout
- Handle direnv errors correctly
- Read stdout of direnv completely right away as the process only then terminates
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.

Does not work on GoLand
1 participant