From ef104601727745f357bc95f32d4a43c6df2a54f1 Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Mon, 9 Jul 2018 18:16:56 +0100 Subject: [PATCH] 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 --- build.psm1 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/build.psm1 b/build.psm1 index 51541fa4d1..b8e59d4ecc 100644 --- a/build.psm1 +++ b/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 }