You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ fnm use 22
Can't find an installed Node version matching v22.x.x.
Do you want to install it? answer [y/N]: ^C
Would prefer: a way to disable this prompt, effectively the opposite of --install-if-missing and for fnm to return a non-zero exit code if it didn't use nor installed the specified version.
Scenario: I'm writing a CI script that wants to make use of specific versions, in an order of preferences, but not install any.
For example: fnm use 22 || fnm use 20 || fnm use 18 --install-if-missing
If it was just one, I could use echo "n" || fnm use 22, but it requires a lot more scripting to make the chain work due to fnm returning a 0 exit code.
The text was updated successfully, but these errors were encountered:
I remember making “install if missing” by checking if stdout is tty. That should cover your case. I wonder why it isnt. Maybe because of the last piped command in your example which is actually interactive (it pipes to stdout/stderr which are interactive)
Problem:
fnm use
prompts to install version.Would prefer: a way to disable this prompt, effectively the opposite of
--install-if-missing
and for fnm to return a non-zero exit code if it didn't use nor installed the specified version.Scenario: I'm writing a CI script that wants to make use of specific versions, in an order of preferences, but not install any.
For example:
fnm use 22 || fnm use 20 || fnm use 18 --install-if-missing
If it was just one, I could use
echo "n" || fnm use 22
, but it requires a lot more scripting to make the chain work due to fnm returning a 0 exit code.The text was updated successfully, but these errors were encountered: