Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerLine fails to import in a PSRemote session #32

Open
jasonmarcher opened this issue Jul 25, 2018 · 3 comments
Open

PowerLine fails to import in a PSRemote session #32

jasonmarcher opened this issue Jul 25, 2018 · 3 comments

Comments

@jasonmarcher
Copy link

This might also be a problem with Pansies.

Import-Metadata : Exception calling "InvokeReturnAsIs" with "1" argument(s): "Cannot convert value "Cyan" to type "PoshCode.Pansies.RgbColor". Error: "GetConsoleScreenBufferInfoEx->WinError:
#6""
At C:\Program Files\WindowsPowerShell\Modules\Configuration\1.3.0\Configuration.psm1:417 char:21
+ ...             Import-Metadata $EnterprisePath -ErrorAction Ignore -Orde ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Metadata], MethodInvocationException
    + FullyQualifiedErrorId : RuntimeException,Import-Metadata

Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Collections.Generic.List`1[PoshCode.Pansies.RgbColor]".
At C:\Program Files\WindowsPowerShell\Modules\PowerLine\3.0.3\PowerLine.psm1:45 char:13
+             "Cyan","DarkCyan","Gray","DarkGray","Gray"
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : ConvertToFinalInvalidCastException

Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6"
At C:\Program Files\WindowsPowerShell\Modules\PowerLine\3.0.3\PowerLine.psm1:787 char:5
+     [PoshCode.Pansies.RgbColor]::ResetConsolePalette()
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Exception

Enter-PSSession : Running startup script threw an error: Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6".
At line:1 char:1
+ Enter-PSSession jarcher -ConfigurationName Profile
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Enter-PSSession], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation
@Jaykul
Copy link
Owner

Jaykul commented Dec 11, 2018

Looks like a PANSIES problem, but I'm not sure why! I'll look into this...

@AskAlice
Copy link

AskAlice commented Dec 4, 2019

You can test this with https://github.com/oliverschwendener/ueli. refresh indexes

@AskAlice
Copy link

AskAlice commented Dec 4, 2019

 Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6"
 At C:\Users\alice\Documents\WindowsPowerShell\Modules\PowerLine\3.1.2\PowerLine.psm1:679 char:5
 + [PoshCode.Pansies.RgbColor]::ResetConsolePalette()
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
 + FullyQualifiedErrorId : Exception
 
 Set-GitPromptSetting : Cannot process argument transformation on parameter 'BranchForeground'. Cannot convert value 
 "Black" to type "PoshCode.Pansies.RgbColor". Error: "GetConsoleScreenBufferInfoEx->WinError: #6"
 At C:\Users\alice\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:32 char:76
 + ... -BranchText "$([char]0xE0A0) " -BranchForeground Black -Branch ...
 + ~~~~~
 + CategoryInfo : InvalidData: (:) [Set-GitPromptSetting], ParameterBindingArgumentTransformationException
 + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-GitPromptSetting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants