Skip to content

Commit 71b8207

Browse files
[Ubuntu] Change source of n tool to official (#4455)
1 parent 206a818 commit 71b8207

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ $toolsList = @(
126126
(Get-HGVersion),
127127
(Get-MinikubeVersion),
128128
(Get-NewmanVersion),
129+
(Get-NVersion),
129130
(Get-NvmVersion),
130131
(Get-OpensslVersion),
131132
(Get-PackerVersion),

images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ function Get-NewmanVersion {
170170
return "Newman $(newman --version)"
171171
}
172172

173+
function Get-NVersion {
174+
$nVersion = (n --version).Replace('v', '')
175+
return "n $nVersion"
176+
}
177+
173178
function Get-NvmVersion {
174179
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
175180
return "nvm $nvmVersion"

images/linux/scripts/installers/nodejs.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ source $HELPER_SCRIPTS/install.sh
99

1010
# Install default Node.js
1111
defaultVersion=$(get_toolset_value '.node.default')
12-
# TODO: Usage of "githubusercontent.com/mklement0" doesn't look like a correct approach. Need to correct it according to the official Node.js docs.
13-
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
14-
~/n/bin/n $defaultVersion
12+
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n
13+
bash ~/n $defaultVersion
1514

1615
# Install node modules
1716
node_modules=$(get_toolset_value '.node_modules[].name')

0 commit comments

Comments
 (0)