Make 'Start-PsBuild -Clean' not prompt due to locked files when Visual Studio is open by excluding sqlite3 folder and use -x instead of -X option on git clean (#7235)
* Exclude sqllite folder when cleaning and use -x instead of -X option * Remove 2nd git clean block which is redundant now
This commit is contained in:
parent
9dcfddde9e
commit
ef10460172
10
build.psm1
10
build.psm1
|
@ -458,15 +458,11 @@ function Start-PSBuild {
|
|||
}
|
||||
|
||||
if ($Clean) {
|
||||
Write-Log "Cleaning your working directory. You can also do it with 'git clean -fdX'"
|
||||
Write-Log "Cleaning your working directory. You can also do it with 'git clean -fdx --exclude .vs/PowerShell/v15/Server/sqlite3'"
|
||||
Push-Location $PSScriptRoot
|
||||
try {
|
||||
git clean -fdX
|
||||
# Extra cleaning is required to delete the CMake temporary files.
|
||||
# These are not cleaned when using "X" and cause CMake to retain state, leading to
|
||||
# mis-configured environment issues when switching between x86 and x64 compilation
|
||||
# environments.
|
||||
git clean -fdx .\src\powershell-native
|
||||
# Excluded sqlite3 folder is due to this Roslyn issue: https://github.com/dotnet/roslyn/issues/23060
|
||||
git clean -fdx --exclude .vs/PowerShell/v15/Server/sqlite3
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue