From abd8460e82fb7ccc876e122a56dac29204027caf Mon Sep 17 00:00:00 2001 From: Aaron Roney Date: Tue, 20 Mar 2018 21:44:34 -0700 Subject: [PATCH] Fix for Netcore build cleanup. --- tools/CleanupBuild.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/CleanupBuild.ps1 b/tools/CleanupBuild.ps1 index 75e204352765..ea9e4ee128f9 100644 --- a/tools/CleanupBuild.ps1 +++ b/tools/CleanupBuild.ps1 @@ -47,11 +47,11 @@ foreach ($RMFolder in $resourceManagerFolders) Write-Verbose "Removing scripts and psd1 in $($RMFolder.FullName)" if (Test-Path -Path "$($RMFolder.FullName)\StartupScripts") { - $scriptName = "$($RMFolder.FullName)\StartupScripts\$($RMFolder.Name.replace('.', ''))Startup.ps1" + $scriptName = "$($RMFolder.FullName)$([IO.Path]::DirectorySeparatorChar)StartupScripts$([IO.Path]::DirectorySeparatorChar)$($RMFolder.Name.replace('.', ''))Startup.ps1" Write-Verbose $scriptName $removedScripts = Get-ChildItem -Path "$($RMFolder.FullName)\StartupScripts" -Filter "*.ps1" | where { $_.FullName -ne $scriptName } $removedScripts | % { Write-Verbose "Removing $($_.FullName)"; Remove-Item $_.FullName -Force } } - $removedPsd1 = Get-ChildItem -Path "$($RMFolder.FullName)" -Filter "*.psd1" | where { $_.FullName -ne "$($RMFolder.FullName)\$($RMFolder.Name).psd1" } + $removedPsd1 = Get-ChildItem -Path "$($RMFolder.FullName)" -Filter "*.psd1" | where { $_.FullName -ne "$($RMFolder.FullName)$([IO.Path]::DirectorySeparatorChar)$($RMFolder.Name).psd1" } $removedPsd1 | % { Write-Verbose "Removing $($_.FullName)"; Remove-Item $_.FullName -Force } }