Skip to content

Commit

Permalink
Use Https instead of Http in InstallNode scripts (dotnet#49764)
Browse files Browse the repository at this point in the history
* Use Https instead of Http in InstallNode scripts

* One too many S's

* Steal Aditya's work
  • Loading branch information
wtgodbe authored Aug 1, 2023
1 parent 421e476 commit 36ce70a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions eng/helix/content/InstallNode.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<#
.SYNOPSIS
Installs NodeJs from http://nodejs.org/dist on a machine
.DESCRIPTION
This script installs NodeJs from http://nodejs.org/dist on a machine.
<#
.SYNOPSIS
Installs Node.js from https://nodejs.org/dist on a machine
.DESCRIPTION
This script installs Node.js from https://nodejs.org/dist on a machine.
.PARAMETER Version
The version of NodeJS to install.
.LINK
The version of Node.js to install.
.LINK
https://nodejs.org/en/
#>
#>
param(
[Parameter(Mandatory = $true)]
$Version
Expand All @@ -32,8 +32,8 @@ if (Test-Path "$InstallDir\node.exe")
}

$nodeFile="node-v$Version-win-x64"
$url="http://nodejs.org/dist/v$Version/$nodeFile.zip"
Write-Host "Starting download of NodeJs ${Version} from $url"
$url="https://nodejs.org/dist/v$Version/$nodeFile.zip"
Write-Host "Starting download of Node.js ${Version} from $url"
& $PSScriptRoot\Download.ps1 $url nodejs.zip
Write-Host "Done downloading NodeJS ${Version}"

Expand All @@ -53,7 +53,7 @@ else {
[System.IO.Compression.ZipFile]::ExtractToDirectory("nodejs.zip", $tempDir)
}

Write-Host "Expanded NodeJs to $tempDir, moving $tempDir\$nodeFile to $InstallDir subdir"
Write-Host "Expanded Node.js to $tempDir, moving $tempDir\$nodeFile to $InstallDir subdir"
move $tempDir\$nodeFile $InstallDir
if (Test-Path "$InstallDir\node.exe")
{
Expand Down
2 changes: 1 addition & 1 deletion eng/helix/content/installnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
echo "PlatformArch: $platformarch"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
output_dir="$DIR/node"
url="http://nodejs.org/dist/v$node_version/node-v$node_version-$platformarch.tar.gz"
url="https://nodejs.org/dist/v$node_version/node-v$node_version-$platformarch.tar.gz"
echo "Downloading from: $url"
tmp="$(mktemp -d -t install-node.XXXXXX)"

Expand Down

0 comments on commit 36ce70a

Please sign in to comment.