From bcac0ece628d67155bec9a0f10bfd102daebb7d9 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Mon, 25 Jul 2016 19:53:21 -0700 Subject: [PATCH] Improve Start-PSBuild -Clean Always do the clean in the root folder --- build.psm1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 70eb5d9c5f..e0139afd1d 100644 --- a/build.psm1 +++ b/build.psm1 @@ -89,7 +89,15 @@ function Start-PSBuild { if ($Clean) { log "Cleaning your working directory. You can also do it with 'git clean -fdX'" - git clean -fdX + Push-Location $PSScriptRoot + try + { + git clean -fdX + } + finally + { + Pop-Location + } } # save Git description to file for PowerShell to include in PSVersionTable