feat(scoop-diag): Add parent process

This commit is contained in:
Richard Kuhnt
2023-06-16 20:23:02 +02:00
parent 62f52d9afa
commit 053321c7b7

View File

@@ -49,6 +49,11 @@ Show-Value -Name 'Version' -Value $PSversionTable.PSVersion.ToString()
Show-Value -Name 'Edition' -Value $PSversionTable.PSEdition
Show-Value -Name 'Architecture' -Value (Get-DefaultArchitecture)
Show-Value -Name 'RunAsAdmin' -Value (is_admin)
$parent = [System.Diagnostics.Process]::GetCurrentProcess()
while($parent.MainModule.ModuleName -ieq 'pwsh.exe' -or $parent.MainModule.ModuleName -ieq 'powershell.exe') {
$parent = $parent.Parent
}
Show-Value -Name 'Parent' -Value $parent.MainModule.ModuleName
Write-Output "[Helpers]"
Show-Value -Name 'GitPath' -Value (Get-HelperPath -Helper Git)