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

When resizing the VS Code terminal fnm spams 'Can't infer shell' errors #1329

Open
efindus opened this issue Nov 17, 2024 · 0 comments
Open

Comments

@efindus
Copy link

efindus commented Nov 17, 2024

My issue is mostly described above. I tried investigating the cause and I think that this happens because my fish prompt (Tide) calls fish when rendering the prompt, causing fnm env --use-on-cd | source to run. If the terminal is resized quickly enough the rendering of the prompt may be cancelled, which apparently orphans the fnm process, preventing it from finding any shell in its process tree. Currently my solution is to manually set the shell type, but it does not feel ideal (and I don't really know which of the three involved projects should this issue be filed on).

One related grudge is that when there are any errors (such as when the node version from .node-version is not installed) they get logged each time the prompt renders (because the script generated by fnm env --use-on-cd calls the cd hook when sourced), breaking the prompt/making it appear twice.

I wanted to fix both of these myself but none of the solutions I tried were very practical outside of my particular setup, hence this isn't a PR as I originally intended.

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

No branches or pull requests

1 participant