mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix bug about Admin tests defaults Start-PSPester in build.psm1
This commit is contained in:
+2
-2
@@ -621,14 +621,14 @@ function Start-PSPester {
|
||||
throw '-Unelevate cannot be applied because the current user is not Administrator'
|
||||
}
|
||||
|
||||
if (-not $PSBoundParameters.ContainsKey('RequireAdminOnWindows'))
|
||||
if (-not $PSBoundParameters.ContainsKey('ExcludeTag'))
|
||||
{
|
||||
$ExcludeTag += 'RequireAdminOnWindows'
|
||||
}
|
||||
}
|
||||
elseif ($IsWindows -and (-not $IsAdmin))
|
||||
{
|
||||
if (-not $PSBoundParameters.ContainsKey('RequireAdminOnWindows'))
|
||||
if (-not $PSBoundParameters.ContainsKey('ExcludeTag'))
|
||||
{
|
||||
$ExcludeTag += 'RequireAdminOnWindows'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user