Skip to content
Merged
Changes from 1 commit
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
10 changes: 3 additions & 7 deletions scripts/prepare-machine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
$ProgressPreference = 'SilentlyContinue'

$PrepConfig = & (Join-Path $PSScriptRoot get-buildconfig.ps1) -Tls $Tls
$Tls = $PrepConfig.Tls

if ($PSVersionTable.PSVersion.Major -lt 7) {
# This script requires PowerShell core (mostly for xplat stuff).
Write-Error ("`nPowerShell v7.x or greater is needed for this script to work. " +
Expand All @@ -116,7 +119,6 @@ if (!$ForOneBranch -and !$ForOneBranchPackage -and !$ForBuild -and !$ForTest -an
Write-Host "No arguments passed, defaulting -ForBuild and -ForTest"
$ForBuild = $true
$ForTest = $true
if ("" -eq $Tls -and !$ForKernel) { $Tls = "openssl" }
}

if ($ForBuild) {
Expand Down Expand Up @@ -146,12 +148,6 @@ if ($InstallXdpDriver) {
$InstallXdpSdk = $true
}

# Default TLS based on current platform.
if ("" -eq $Tls) {
if ($IsWindows) { $Tls = "schannel" }
else { $Tls = "openssl" }
}

# Root directory of the project.
$RootDir = Split-Path $PSScriptRoot -Parent
$ArtifactsPath = Join-Path $RootDir "artifacts"
Expand Down