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

[bug/show-terminaliconstheme] Command displays default file icon on folders #122

Open
DoctorSclero opened this issue Dec 22, 2023 · 0 comments

Comments

@DoctorSclero
Copy link

DoctorSclero commented Dec 22, 2023

Expected Behavior

Executing the command should display the themed folder icons.

Current Behavior

Executing the command renders correctly the file icons but treats folders as files, displaying the default file icon.

image

The issue is not experienced in normal use:

image

Possible Solution

I think the problem could be in Resolve-Icon.ps1, following step by step the code execution running the commands by hand
in the terminal, I couldn't find the PSIsContainer attribute on $FileInfo, maybe it skips to the type of file because of that.
I still have to figure out why it does not occur in normal use.

My poor attempt to figure out the problem 😅:

image
image

As you can see nothing is returned, and it didn't autocomplete. (The smaller image is the expected custom one)
The piece of code I think is responsible for the bug:

if ($FileInfo.PSIsContainer) { <----- PSIsContainer not present
    $type = 'Directories'
} else {
    $type = 'Files'
}

Steps to Reproduce (for bugs)

  1. Import-Module Terminal-Icons
  2. Show-TerminalIconsTheme

Context

I'm using the command to debug the icon theme I'm creating.

Your Environment

  • OS: Microsoft Windows 11
  • Terminal Emulator: Windows Terminal, PowerShell 7.4.0
  • Terminal-Icons Module Version: 0.11.0
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

1 participant