Skip to content

Koan AboutSelectObject has undesired error #444

@peetrike

Description

@peetrike

Describe "Koan Bug, Issue, or Help Request"

When looking at unresolved koan AboutSelectObject, the following error occurs:

Show-Karma -Topic AboutSelectObject
Invoke-Koan: C:\Program Files\WindowsPowerShell\Modules\PSKoans\0.67.1\Public\Get-Karma.ps1:111
Line |
 111 |                  $PesterTests = Invoke-Koan @{
     |                                 ~~~~~~~~~~~~~~
     | Property "____" cannot be found.

The same error occurs in PowerShell 5.1 and 7

Context "The Problematic Assertions"

The problem occurs on line

$Value = Get-Item -Path $PSHome | Select-Object -ExpandProperty $PropertyToExpand

The error can easily be avoided by ignoring error from Select-Object cmdlet

Context "Your Attempts"

Context "Additional Information"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions