Merge pull request #29147 from Microsoft/jjh/makeroot
Windows: make.ps1 calc root Upstream-commit: ba4f8f06b3cab866c58945a9b7a7f3735c855b32 Component: engine
This commit is contained in:
@@ -308,7 +308,10 @@ Function Run-UnitTests() {
|
||||
# Start of main code.
|
||||
Try {
|
||||
Write-Host -ForegroundColor Cyan "INFO: make.ps1 starting at $(Get-Date)"
|
||||
$root=$(pwd)
|
||||
|
||||
# Get to the root of the repo
|
||||
$root = $(Split-Path $MyInvocation.MyCommand.Definition -Parent | Split-Path -Parent)
|
||||
Push-Location $root
|
||||
|
||||
# Handle the "-All" shortcut to turn on all things we can handle.
|
||||
if ($All) { $Client=$True; $Daemon=$True; $DCO=$True; $PkgImports=$True; $GoFormat=$True; $TestUnit=$True }
|
||||
@@ -403,6 +406,7 @@ Catch [Exception] {
|
||||
Throw $_
|
||||
}
|
||||
Finally {
|
||||
Pop-Location # As we pushed to the root of the repo as the very first thing
|
||||
if ($global:pushed) { Pop-Location }
|
||||
Write-Host -ForegroundColor Cyan "INFO: make.ps1 ended at $(Get-Date)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user