Skip to content

Write-Host: Cannot process the color because -1 is not a valid color. (Parameter 'value') Actual value was -1. #3

@janegilring

Description

@janegilring

When executing either kubens or kubectx, the following error is present:

Write-Host: Cannot process the color because -1 is not a valid color. (Parameter 'value') Actual value was -1.

I was testing inside an Ubuntu 20.04 WSL instance with the following PowerShell version:

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.0
PSEdition                      Core
GitCommitId                    7.2.0
OS                             Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021
Platform                       Unix

This happens only in the interactive mode. If using -Arguments, autocompletion and the commands itself works just fine.
Terminal is Windows Terminal on Windows 11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions