Fix tools.ps1

This commit is contained in:
Will Godbe 2020-09-01 15:49:38 -07:00
parent 96b1c236d0
commit 08309b1e02
1 changed files with 5 additions and 3 deletions

View File

@ -222,8 +222,8 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
return $installScript
}
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
InstallDotNet $dotnetRoot $version $architecture
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '', [switch] $noPath) {
InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey -noPath:$noPath
}
function InstallDotNet([string] $dotnetRoot,
@ -232,7 +232,8 @@ function InstallDotNet([string] $dotnetRoot,
[string] $runtime = '',
[bool] $skipNonVersionedFiles = $false,
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '') {
[string] $runtimeSourceFeedKey = '',
[switch] $noPath) {
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
@ -243,6 +244,7 @@ function InstallDotNet([string] $dotnetRoot,
if ($architecture) { $installParameters.Architecture = $architecture }
if ($runtime) { $installParameters.Runtime = $runtime }
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
if ($noPath) { $installParameters.NoPath = $True }
try {
& $installScript @installParameters