Skip to content

Commit

Permalink
uncomment nvm installation in pwsh
Browse files Browse the repository at this point in the history
  • Loading branch information
Amirhossein authored and Amirhossein committed Jan 20, 2024
1 parent 53ca4d5 commit 1625a95
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Source/BSN.IpTables.Cli/Generate-PowerShellClient.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ if ($PSEdition -ne 'Core') {
Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
}

# try {
# Write-Host "Nvm is installed, version" $(nvm --version)
# }
# catch {
# Write-Error "Nvm is not installed, install it manually to continue."
# }
try {
Write-Host "Nvm is installed, version" $(nvm --version)
}
catch {
Write-Error "Nvm is not installed, install it manually to continue."
}

# # 18.18.0 is the latest LTS node version
# New-Variable -Name desiredNodeVersion -Value 'v18.18.0' -Option ReadOnly
# if ($(nvm current) -ne $desiredNodeVersion) {
# nvm install $desiredNodeVersion
# nvm use $desiredNodeVersion
# }
# else {
# Write-Host "Node is installed, version" $desiredNodeVersion
# }
if ($(nvm current) -ne $desiredNodeVersion) {
nvm install $desiredNodeVersion
nvm use $desiredNodeVersion
}
else {
Write-Host "Node is installed, version" $desiredNodeVersion
}

try {
(autorest --version).Split([Environment]::NewLine) | Select -First 1
Expand Down

0 comments on commit 1625a95

Please sign in to comment.