Install the package provider for PinnedItem
This commit is contained in:
parent
03b626dec9
commit
d90fc5772e
1 changed files with 6 additions and 0 deletions
|
@ -20,7 +20,13 @@ Start-SoftwareInstaller @parameters -Installer {
|
|||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
$providerName = "NuGet";
|
||||
$module = $Arguments.Name;
|
||||
|
||||
if ({ $null = powershell -c "Get-PackageProvider -ListAvailable $providerName"; $? }) {
|
||||
$null = powershell -c "Install-PackageProvider -Force $providerName";
|
||||
}
|
||||
|
||||
& $Arguments.Installer @PSBoundParameters;
|
||||
|
||||
if (-not (& { powershell -NoProfile -Command "Import-Module $module; exit ([bool]`$Error)" 2> $null; $?; })) {
|
||||
|
|
Loading…
Reference in a new issue