From 3938cdb33a405a32d3fa52f64f87a4e8d4810147 Mon Sep 17 00:00:00 2001 From: Manikyam Bavandla Date: Fri, 16 Dec 2016 22:16:03 -0800 Subject: [PATCH] [Build] Update the logic to remove PSGetModuleInfo.xml from PowerShellGet module on Non-Windows platforms. (#2897) --- build.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 64d83f1baa..e1850ad8f2 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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 } }