[Build] Update the logic to remove PSGetModuleInfo.xml from PowerShellGet module on Non-Windows platforms. (#2897)

This commit is contained in:
Manikyam Bavandla
2016-12-16 22:16:03 -08:00
committed by Dongbo Wang
parent 047cfdeaf0
commit 3938cdb33a
+2 -2
View File
@@ -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
}
}