Make Powershell completion script work in constrained mode (#2196)
Creating CompletionResult objects is not allowed in Powershell constrained mode, so return results as strings if constrained mode is enabled Store results as PsCustomObjects instead of hashtables. This prevents Sort-Object from trying to convert the hashtable to a object, which is blocked in constrained mode. PsCustomObjects are created using New-Object to work around https://github.com/PowerShell/PowerShell/issues/20767
L
Leonhard Stemplinger committed
5a138f143f25d616c6c195356a6560ed4fbbfdd4
Parent: 3a5efae
Committed by GitHub <noreply@github.com>
on 11/4/2024, 12:45:01 AM