[Ubuntu] Change source of n tool to official (#4455)

This commit is contained in:
Nikolay Frolov
2021-11-11 12:47:29 +03:00
committed by GitHub
parent 206a818319
commit 71b8207a59
3 changed files with 8 additions and 3 deletions

View File

@@ -126,6 +126,7 @@ $toolsList = @(
(Get-HGVersion),
(Get-MinikubeVersion),
(Get-NewmanVersion),
(Get-NVersion),
(Get-NvmVersion),
(Get-OpensslVersion),
(Get-PackerVersion),

View File

@@ -170,6 +170,11 @@ function Get-NewmanVersion {
return "Newman $(newman --version)"
}
function Get-NVersion {
$nVersion = (n --version).Replace('v', '')
return "n $nVersion"
}
function Get-NvmVersion {
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
return "nvm $nvmVersion"

View File

@@ -9,9 +9,8 @@ source $HELPER_SCRIPTS/install.sh
# Install default Node.js
defaultVersion=$(get_toolset_value '.node.default')
# TODO: Usage of "githubusercontent.com/mklement0" doesn't look like a correct approach. Need to correct it according to the official Node.js docs.
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
~/n/bin/n $defaultVersion
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n
bash ~/n $defaultVersion
# Install node modules
node_modules=$(get_toolset_value '.node_modules[].name')