mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
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:
1 parent
1ad8dec8d2
commit
c531098f3b
1 file changed
+8
-3
+8
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user