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

The displayed Name and Hex properties are empty #59

Closed
sba923 opened this issue Mar 6, 2024 · 12 comments
Closed

The displayed Name and Hex properties are empty #59

sba923 opened this issue Mar 6, 2024 · 12 comments

Comments

@sba923
Copy link

sba923 commented Mar 6, 2024

I've tried the example given in https://twitter.com/JamesBru/status/1761091548383707161.

All I get (both in Windows PowerShell 5.1.19041.4046 and in PowerShell 7.4.1) is:

image

(OS is Windows 10 build 10.0.19041.4046)

@StartAutomating StartAutomating changed the title The Name and Hex properties are empty The Name and Hex properties are empty on WindowsPowerShell Mar 6, 2024
@StartAutomating
Copy link
Owner

Thank you for the reminder....

To mark this module as only working on core.

Most of the Emoji will not render on non-core, and the escape sequence is not supported.

@sba923
Copy link
Author

sba923 commented Mar 6, 2024

It also fails with 7.4.1!

Here's what $error has to say:

image

@sba923
Copy link
Author

sba923 commented Mar 6, 2024

Works from 7.4.1 launched with -noprofile:

image

@StartAutomating
Copy link
Owner

@sba923 Still looks very weird. I don't think oh-my-posh is doing it, but trying without that might work.

The other guess I have is execution policy (it could be affecting the types files more silently than I would like).

@sba923
Copy link
Author

sba923 commented Mar 6, 2024

Launching oh-my-posh with the same arguments as from my profile doesn't break Get-Emoji:

image

@StartAutomating
Copy link
Owner

The place that is complaining is related to colorization / style, and might be tripped if $psStyle was set to an unexpected value.

If this is the case, you should also see colorization errors if you load up Posh

If you do, then the actual issue is in EZOut (which builds formatters for all of these things)

@sba923
Copy link
Author

sba923 commented Mar 6, 2024

Does this shed some light on the issue?

image

@sba923 sba923 changed the title The Name and Hex properties are empty on WindowsPowerShell The displayed Name and Hex properties are empty Mar 6, 2024
@StartAutomating
Copy link
Owner

StartAutomating commented Mar 6, 2024

Yeah and no. Based off of what you've already sent I already know it's related to $psStyle and how colorization is handled.

But not why it's broken, or how.

Can you poke at $psStyle a bit when it's broken (and not broken) and see what might be going on?

@sba923
Copy link
Author

sba923 commented Mar 7, 2024

$PSStyle is identical in broken and non-broken sessions.

Posh doesn't break Get-Emoji's output.

@sba923
Copy link
Author

sba923 commented Mar 7, 2024

And the culprit is...🥁

Set-StrictMode -Version latest

@StartAutomating
Copy link
Owner

Glad we've found the culprit!

You should be able to reproduce this in EZOut by creating any formatter that uses -Style* parameters:

https://twitter.com/SBarizien/status/1766043978640585185 (just add -StyleProperty to your example)

@sba923
Copy link
Author

sba923 commented Mar 9, 2024

Fix confirmed, good job!

image

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

No branches or pull requests

2 participants