File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11function Initialize-ExternalLibrary {
22 # Load external libraries for a specific RDBMS
3+ [CmdletBinding (SupportsShouldProcess )]
4+ [Diagnostics.CodeAnalysis.SuppressMessageAttribute (" PSShouldProcess" , ' ' )]
35 Param (
46 [Parameter (Mandatory )]
57 [DBOps.ConnectionType ]$Type
@@ -39,7 +41,7 @@ function Initialize-ExternalLibrary {
3941 if (-Not (Test-DBOSupportedSystem - Type $Type )) {
4042 Write-PSFMessage - Level Warning - Message " Installing dependent libraries for $Type connections"
4143 # Install dependencies into the current user scope
42- $null = Install-DBOSupportLibrary - Type $Type - Scope CurrentUser
44+ $null = Install-DBOSupportLibrary - Type $Type - Scope CurrentUser - WhatIf: $WhatIfPreference
4345 # test again
4446 if (-Not (Test-DBOSupportedSystem - Type $Type )) {
4547 Write-PSFMessage - Level Warning - Message " Dependent libraries for $Type were not found. Run Install-DBOSupportLibrary -Type $Type "
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ function Install-NugetPackage {
9393 }
9494 $folder = New-Item - ItemType Directory - Path $path - Force
9595
96- $baseAddressUrl = $indexObject .resources | Where-Object { $_ .' @type' -eq ' PackageBaseAddress/3.0.0' } | Select-Object - First 1
96+ $baseAddressUrl = $index .resources | Where-Object { $_ .' @type' -eq ' PackageBaseAddress/3.0.0' } | Select-Object - First 1
9797 $downloadUrl = " $ ( $baseAddressUrl .' @id' ) $packageLowerName /$selectedVersion /$fileName "
9898 Invoke-WebRequest - Uri $downloadUrl - OutFile $packagePath - ErrorAction Stop
9999 Write-PSFMessage - Level Verbose - Message " Extracting $fileName to $folder "
You can’t perform that action at this time.
0 commit comments