mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[Ubuntu] Change source of n tool to official (#4455)
This commit is contained in:
@@ -126,6 +126,7 @@ $toolsList = @(
|
|||||||
(Get-HGVersion),
|
(Get-HGVersion),
|
||||||
(Get-MinikubeVersion),
|
(Get-MinikubeVersion),
|
||||||
(Get-NewmanVersion),
|
(Get-NewmanVersion),
|
||||||
|
(Get-NVersion),
|
||||||
(Get-NvmVersion),
|
(Get-NvmVersion),
|
||||||
(Get-OpensslVersion),
|
(Get-OpensslVersion),
|
||||||
(Get-PackerVersion),
|
(Get-PackerVersion),
|
||||||
|
|||||||
@@ -170,6 +170,11 @@ function Get-NewmanVersion {
|
|||||||
return "Newman $(newman --version)"
|
return "Newman $(newman --version)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-NVersion {
|
||||||
|
$nVersion = (n --version).Replace('v', '')
|
||||||
|
return "n $nVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-NvmVersion {
|
function Get-NvmVersion {
|
||||||
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
|
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
|
||||||
return "nvm $nvmVersion"
|
return "nvm $nvmVersion"
|
||||||
|
|||||||
@@ -9,9 +9,8 @@ source $HELPER_SCRIPTS/install.sh
|
|||||||
|
|
||||||
# Install default Node.js
|
# Install default Node.js
|
||||||
defaultVersion=$(get_toolset_value '.node.default')
|
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 -L https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n
|
||||||
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
|
bash ~/n $defaultVersion
|
||||||
~/n/bin/n $defaultVersion
|
|
||||||
|
|
||||||
# Install node modules
|
# Install node modules
|
||||||
node_modules=$(get_toolset_value '.node_modules[].name')
|
node_modules=$(get_toolset_value '.node_modules[].name')
|
||||||
|
|||||||
Reference in New Issue
Block a user