-
Notifications
You must be signed in to change notification settings - Fork 403
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
Fixes issue where fnm print the node version string when using fish shell in non-interactive mode #958
base: master
Are you sure you want to change the base?
Fixes issue where fnm print the node version string when using fish shell in non-interactive mode #958
Conversation
prints out a change message
🦋 Changeset detectedLatest commit: 92d7605 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There is log level configuration that can be set to error, which will do exactly what you want, or am I missing something? |
Maybe. But then the log level should be set to error as a default in non-interactive mode right? |
Hmmm…. Define non interactive? fnm is not a shell. It’s not a debug statement, it’s an info/stdout kind of thing. I don’t think fnm should be quiet by default |
Ah sorry for being verbose. I meant when the But another way to achieve that could be to change the logging level here in case the |
else | ||
fnm use --silent | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for only circling back to it now, can we maybe put it --log-level=error
here to avoid info
messages?
any news on the |
This week I ran into an issue with
Neovide
, a neovim gui (also written in rust).I proposed GH-955 but did not feel this was the right fix for this issue, so this PR replaces that.
Neovide starts neovim in a sub-shell and uses the neovim --embed mode to read and write msgpack messages to and from stdout.
When I start Neovide in a folder with a
.nvmrc
that defines a node version that is not my default,fnm
prints a message and that ends up in the communication between Neovide and nvim and makes it crash.Neovide runs a non-interactive shell, and in that mode your shell init scripts are not supposed to print anything. In that mode, the shell typically don't ready
.bashrc
and similar. However, for thefish
shell, it seems like it always reads config.fish (fish-shell/fish-shell#5394).This PR adds changes the behaviour of
fnm env --use-on-cd
for thefish
shell to add a conditional check whether the shell is interactive or not. Iffish
is in non-interactive modefnm use
is started with a new switch--silent
that will not letfnm
output the version string even if the version will change.