-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix for Netcore build cleanup. #5779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
maddieclayton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix - just two more places I think the fix belongs.
| $removedDlls | % { Write-Verbose "Removing $($_.Name)"; Remove-Item $_.FullName -Force } | ||
|
|
||
| Write-Verbose "Removing scripts and psd1 in $($RMFolder.FullName)" | ||
| if (Test-Path -Path "$($RMFolder.FullName)\StartupScripts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maddieclayton, I can add the fix here, but it is not required. Test-Path and Get-ChildItem will properly resolve \ and /. The problem is the string comparison when Get-ChildItem returns "/a/cool/path", and we compare it to "/a/cool\path".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no worries then. LGTM
| $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 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
Fices path comparison in the cleanup script on Netcore. Otherwise, module PSD1s get deleted.
Description
Checklist
CONTRIBUTING.mdplatyPSmodule