Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Https instead of Http in InstallNode scripts #49764

Merged
merged 8 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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