diff --git a/src/PowerShellGet/PowerShellGet.psd1 b/src/PowerShellGet/PowerShellGet.psd1 index 1b792ceb..c1bd9b2a 100644 --- a/src/PowerShellGet/PowerShellGet.psd1 +++ b/src/PowerShellGet/PowerShellGet.psd1 @@ -1,60 +1,64 @@ @{ - RootModule = 'PSModule.psm1' - ModuleVersion = '2.2.5' - GUID = '1d73a601-4a6c-43c5-ba3f-619b18bbb404' - Author = 'Microsoft Corporation' - CompanyName = 'Microsoft Corporation' - Copyright = '(c) Microsoft Corporation. All rights reserved.' - Description = 'PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, Role Capabilities and Scripts.' - PowerShellVersion = '3.0' - FormatsToProcess = 'PSGet.Format.ps1xml' - FunctionsToExport = @( - 'Find-Command', - 'Find-DSCResource', - 'Find-Module', - 'Find-RoleCapability', - 'Find-Script', - 'Get-CredsFromCredentialProvider', - 'Get-InstalledModule', - 'Get-InstalledScript', - 'Get-PSRepository', - 'Install-Module', - 'Install-Script', - 'New-ScriptFileInfo', - 'Publish-Module', - 'Publish-Script', - 'Register-PSRepository', - 'Save-Module', - 'Save-Script', - 'Set-PSRepository', - 'Test-ScriptFileInfo', - 'Uninstall-Module', - 'Uninstall-Script', - 'Unregister-PSRepository', - 'Update-Module', - 'Update-ModuleManifest', - 'Update-Script', - 'Update-ScriptFileInfo') - - VariablesToExport = 'PSGetPath' - AliasesToExport = @('inmo', 'fimo', 'upmo', 'pumo') - FileList = @('PSModule.psm1', - 'PSGet.Format.ps1xml', - 'PSGet.Resource.psd1') - RequiredModules = @(@{ModuleName = 'PackageManagement'; ModuleVersion = '1.4.4' }) - PrivateData = @{ - "PackageManagementProviders" = 'PSModule.psm1' - "SupportedPowerShellGetFormatVersions" = @('1.x', '2.x') - PSData = @{ - Tags = @('Packagemanagement', - 'Provider', - 'PSEdition_Desktop', - 'PSEdition_Core', - 'Linux', - 'Mac') - ProjectUri = 'https://go.microsoft.com/fwlink/?LinkId=828955' - LicenseUri = 'https://go.microsoft.com/fwlink/?LinkId=829061' - ReleaseNotes = @' + RootModule = 'PSModule.psm1' + ModuleVersion = '2.2.6' + GUID = '1d73a601-4a6c-43c5-ba3f-619b18bbb404' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = '(c) Microsoft Corporation. All rights reserved.' + Description = 'PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, Role Capabilities and Scripts.' + PowerShellVersion = '3.0' + FormatsToProcess = 'PSGet.Format.ps1xml' +FunctionsToExport = @( + 'Find-Command', + 'Find-DSCResource', + 'Find-Module', + 'Find-RoleCapability', + 'Find-Script', + 'Get-CredsFromCredentialProvider', + 'Get-InstalledModule', + 'Get-InstalledScript', + 'Get-PSRepository', + 'Install-Module', + 'Install-Script', + 'New-ScriptFileInfo', + 'Publish-Module', + 'Publish-Script', + 'Register-PSRepository', + 'Save-Module', + 'Save-Script', + 'Set-PSRepository', + 'Test-ScriptFileInfo', + 'Uninstall-Module', + 'Uninstall-Script', + 'Unregister-PSRepository', + 'Update-Module', + 'Update-ModuleManifest', + 'Update-Script', + 'Update-ScriptFileInfo') + + VariablesToExport = 'PSGetPath' + AliasesToExport = @('inmo', 'fimo', 'upmo', 'pumo') + FileList = @('PSModule.psm1', + 'PSGet.Format.ps1xml', + 'PSGet.Resource.psd1') + RequiredModules = @(@{ModuleName = 'PackageManagement'; ModuleVersion = '1.4.4' }) + PrivateData = @{ + "PackageManagementProviders" = 'PSModule.psm1' + "SupportedPowerShellGetFormatVersions" = @('1.x', '2.x') + PSData = @{ + Tags = @('Packagemanagement', + 'Provider', + 'PSEdition_Desktop', + 'PSEdition_Core', + 'Linux', + 'Mac') + ProjectUri = 'https://go.microsoft.com/fwlink/?LinkId=828955' + LicenseUri = 'https://go.microsoft.com/fwlink/?LinkId=829061' + ReleaseNotes = @' +### 2.2.6 +Bug Fix +- Keep AllUsers scope for PowerShell Core script/modules as well (not just up to PS 5.1) when updating via Update-Script and Update-Module + ### 2.2.5 - Security patch for code injection bug @@ -285,3 +289,4 @@ https://github.com/PowerShell/PowerShellGet/blob/master/CHANGELOG.md HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=855963' } + diff --git a/src/PowerShellGet/private/functions/Get-InstallationScope.ps1 b/src/PowerShellGet/private/functions/Get-InstallationScope.ps1 index 7be34995..cf9b9303 100644 --- a/src/PowerShellGet/private/functions/Get-InstallationScope.ps1 +++ b/src/PowerShellGet/private/functions/Get-InstallationScope.ps1 @@ -14,7 +14,6 @@ function Get-InstallationScope() ) if ( -not $PreviousInstallLocation.ToString().StartsWith($currentUserPath, [System.StringComparison]::OrdinalIgnoreCase) -and - -not $script:IsCoreCLR -and (Test-RunningAsElevated)) { $Scope = "AllUsers" }