Install tools except when `-NoToolRestore` is specified
This commit is contained in:
Родитель
14699417fb
Коммит
3f1e85823f
14
init.ps1
14
init.ps1
|
@ -28,6 +28,8 @@
|
|||
No effect if -NoPrerequisites is specified.
|
||||
.PARAMETER NoRestore
|
||||
Skips the package restore step.
|
||||
.PARAMETER NoToolRestore
|
||||
Skips the dotnet tool restore step.
|
||||
.PARAMETER AccessToken
|
||||
An optional access token for authenticating to Azure Artifacts authenticated feeds.
|
||||
.PARAMETER Interactive
|
||||
|
@ -46,6 +48,8 @@ Param (
|
|||
[Parameter()]
|
||||
[switch]$NoRestore,
|
||||
[Parameter()]
|
||||
[switch]$NoToolRestore,
|
||||
[Parameter()]
|
||||
[string]$AccessToken,
|
||||
[Parameter()]
|
||||
[switch]$Interactive
|
||||
|
@ -91,11 +95,13 @@ try {
|
|||
if ($lastexitcode -ne 0) {
|
||||
throw "Failure while restoring packages."
|
||||
}
|
||||
}
|
||||
|
||||
dotnet tool restore @RestoreArguments
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "Failure while restoring dotnet CLI tools."
|
||||
}
|
||||
if (!$NoToolRestore -and $PSCmdlet.ShouldProcess("dotnet tool", "restore")) {
|
||||
dotnet tool restore @RestoreArguments
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "Failure while restoring dotnet CLI tools."
|
||||
}
|
||||
}
|
||||
|
||||
& "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars -PrependPath $PrependPath | Out-Null
|
||||
|
|
Загрузка…
Ссылка в новой задаче