mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[Build] Update the logic to remove PSGetModuleInfo.xml from PowerShellGet module on Non-Windows platforms. (#2897)
This commit is contained in:
committed by
Dongbo Wang
parent
047cfdeaf0
commit
3938cdb33a
+2
-2
@@ -2828,11 +2828,11 @@ function Restore-PSModule
|
||||
|
||||
# pull down the module
|
||||
log "running save-module $_"
|
||||
PowerShellGet\Save-Module @command -Force -Verbose
|
||||
PowerShellGet\Save-Module @command -Force
|
||||
|
||||
# Remove PSGetModuleInfo.xml file
|
||||
Find-Module -Name $_ -Repository $RepositoryName -IncludeDependencies | ForEach-Object {
|
||||
Get-ChildItem -Path (Join-Path -Path $Destination -ChildPath $_.Name) -Recurse -Depth 2 -File -Include 'PSGetModuleInfo.xml' -Attributes h,a,r | Remove-Item -Force
|
||||
Remove-Item -Path $Destination\$($_.Name)\*\PSGetModuleInfo.xml -Force
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user