You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of PR 4612, it was found that the current guideline here recommends this approach
It "Get-Item on a nonexisting file should have error PathNotFound" {
try
{
get-item "ThisFileCannotPossiblyExist" -ErrorAction Stop
throw "No Exception!"
}
catch
{
$_.FullyQualifiedErrorId | should be "PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand"
}
}
However, @iSazonov suggests here that the guideline should be updated to this pattern:
As part of PR 4612, it was found that the current guideline here recommends this approach
However, @iSazonov suggests here that the guideline should be updated to this pattern: