Working directory fix for googletest submodule update (#2151)
* Working directory fix for submodule update The git submodule update for googletest must be run from the script's root directory * Added try-finally block around Push-Location Great recommendation from @vors! The edit is a best practice incase the user Ctrl-C's out of the script. Tested locally by exiting out of: try { Push-Location C:\Users\; Start-Sleep -Seconds 60 } finally { Pop-Location }
This commit is contained in:
parent
1ad8dec8d2
commit
c531098f3b
11
build.psm1
11
build.psm1
@ -698,9 +698,14 @@ function Start-PSBootstrap {
|
||||
try {
|
||||
# Update googletest submodule for linux native cmake
|
||||
if ($IsLinux -or $IsOSX) {
|
||||
$Submodule = "$PSScriptRoot/src/libpsl-native/test/googletest"
|
||||
Remove-Item -Path $Submodule -Recurse -Force -ErrorAction SilentlyContinue
|
||||
git submodule update --init -- $submodule
|
||||
try {
|
||||
Push-Location $PSScriptRoot
|
||||
$Submodule = "$PSScriptRoot/src/libpsl-native/test/googletest"
|
||||
Remove-Item -Path $Submodule -Recurse -Force -ErrorAction SilentlyContinue
|
||||
git submodule update --init -- $submodule
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
}
|
||||
|
||||
# Install ours and .NET's dependencies
|
||||
|
Loading…
Reference in New Issue
Block a user