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
Currently I am trying to work in a script with PowerShell that it automizes the setup of everything I run in terminal. Everything I was able to make it work except the nvm version. I wanted to do it based in search but I cant store the value inside a variable to compare because an error pops saying Terminal only
So I as well tried using the nvm use to check if installed by catching it with a try catch and if not then install. It stays in a loop for max of 4 tries to install the version. But if I run that as well the same warning appears in my screen and it fails to check.
What can I do to get if a version is installed and add it to an if statement.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently I am trying to work in a script with PowerShell that it automizes the setup of everything I run in terminal. Everything I was able to make it work except the nvm version. I wanted to do it based in search but I cant store the value inside a variable to compare because an error pops saying Terminal only
So I as well tried using the nvm use to check if installed by catching it with a try catch and if not then install. It stays in a loop for max of 4 tries to install the version. But if I run that as well the same warning appears in my screen and it fails to check.
What can I do to get if a version is installed and add it to an if statement.
Beta Was this translation helpful? Give feedback.
All reactions