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

PS profile font install checks needed #3164

Open
3 tasks done
mcreekmore opened this issue Jan 17, 2025 · 5 comments · May be fixed by #3171
Open
3 tasks done

PS profile font install checks needed #3164

mcreekmore opened this issue Jan 17, 2025 · 5 comments · May be fixed by #3171
Labels
bug Something isn't working

Comments

@mcreekmore
Copy link

mcreekmore commented Jan 17, 2025

Describe the bug

If you install the CTT PowerShell Profile from the config page, uninstall it, and then attempt to reinstall, the script will prompt you about replacing/skipping font installs. It prompts this for every single font. It took me nearly 3 minutes of waiting for the next prompt and then clicking to get through this process.

Steps to reproduce

  1. Go to Config tab in winutil
  2. Click on 'Install CTT PowerShell Profile'
  3. Restart your shell (likely not necessary)
  4. Click on 'Uninstall CTT PowerShell Profile'
  5. Restart your shell (likely not necessary)
  6. Click on 'Install CTT PowerShell Profile'

Expected behavior

winutil should either have a check to first see if the font it wants to install is already installed, if so skip or uninstall the fonts when users execute the 'Uninstall CTT PowerShell Profile'.

I suggest the former suggestion as its impossible to know which fonts users may have already had install and want to keep.

Screenshots

Image

Additional context

Issue validation

  • I checked for duplicate issues.
  • I checked for already existing discussions.
  • I checked for an already existing pull request addressing the issue.
@mcreekmore mcreekmore added the bug Something isn't working label Jan 17, 2025
@Cryostrixx
Copy link
Contributor

Cryostrixx commented Jan 18, 2025

Hello, @mcreekmore! Thanks for the bug report. I wanted to let you know that there is a check in place to verify if the font is installed before attempting to uninstall it. However, I'll admit that I don’t have extensive experience with using .NET in PowerShell, so I wasn’t able to get the font uninstallation working properly. Additionally, I had only three weeks to implement all of the changes, so I wasn’t able to fully resolve that part of the feature. That said, everything else I added is working as intended. If you or anyone else has experience with .NET scripting, feel free to open a PR with a proposed fix and tag me in it so I can review and test the changes. Thanks again for your feedback, and I look forward to collaborating with you to resolve this issue! 😄

@mcreekmore
Copy link
Author

mcreekmore commented Jan 18, 2025

@Cryostrixx thank you for your response! That's totally okay I just felt like I should report this issue since it certainly introduced a lot of friction for me and I'm sure others.

I would be happy to look into this myself even though I'm not familiar with .NET or PowerShell scripting. It certainly interests me.

And I totally understand about the deadlines and everything. The install and uninstall works full stop and winutil is one of the best windows tools to ever exist!

Thank you for your contributions

@Cryostrixx
Copy link
Contributor

Cryostrixx commented Jan 18, 2025

@Cryostrixx thank you for your response! That's totally okay I just felt like I should report this issue since it certainly introduce a lot of friction for me and I'm sure others.

I would be happy to look into this myself even though I'm not familiar with .NET or PowerShell scripting. It certainly interests me.

And I totally understand about the deadlines and everything. The install and uninstall works full stop and winutil is one of the best windows tools to ever exist!

Thank you for your contributions

Hey, if you do manage to find a way to fix this, feel free to make a PR with the proposed fix and tag me in it, I'll gladly approve the changes if the fix checks out during my testing. I noticed the bug last minute but as I said didn't have time to investigate it thoroughly, and it slipped under the radar until you reported it, so thanks for bringing it to my attention! :)
Just a little note: The issue seems to be present in Uninstall-NerdFonts specifically, you can find that function in functions/private/Invoke-WinUtilUninstallPSProfile.ps1.

@mcreekmore
Copy link
Author

@Cryostrixx thank you for your response! That's totally okay I just felt like I should report this issue since it certainly introduce a lot of friction for me and I'm sure others.

I would be happy to look into this myself even though I'm not familiar with .NET or PowerShell scripting. It certainly interests me.

And I totally understand about the deadlines and everything. The install and uninstall works full stop and winutil is one of the best windows tools to ever exist!

Thank you for your contributions

Hey, if you do manage to find a way to fix this, feel free to make a PR with the proposed fix and tag me in it, I'll gladly approve the changes if the fix checks out during my testing. I noticed the bug last minute but as I said didn't have time to investigate it thoroughly, and it slipped under the radar until you reported it, so thanks for bringing it to my attention! :)
Just a little note: The issue seems to be present in Uninstall-NerdFonts specifically, you can find that function in functions/private/Invoke-WinUtilUninstallPSProfile.ps1.

Thanks for the context it helps immensely! I will be away from my computer for the extended US weekend but I would love to take a look myself.

@Cryostrixx
Copy link
Contributor

Cryostrixx commented Jan 18, 2025

@Cryostrixx thank you for your response! That's totally okay I just felt like I should report this issue since it certainly introduce a lot of friction for me and I'm sure others.
I would be happy to look into this myself even though I'm not familiar with .NET or PowerShell scripting. It certainly interests me.
And I totally understand about the deadlines and everything. The install and uninstall works full stop and winutil is one of the best windows tools to ever exist!
Thank you for your contributions

Hey, if you do manage to find a way to fix this, feel free to make a PR with the proposed fix and tag me in it, I'll gladly approve the changes if the fix checks out during my testing. I noticed the bug last minute but as I said didn't have time to investigate it thoroughly, and it slipped under the radar until you reported it, so thanks for bringing it to my attention! :)
Just a little note: The issue seems to be present in Uninstall-NerdFonts specifically, you can find that function in functions/private/Invoke-WinUtilUninstallPSProfile.ps1.

Thanks for the context it helps immensely! I will be away from my computer for the extended US weekend but I would love to take a look myself.

No problem! This is the last hurdle to overcome in this feature addition so if a fix can be worked on that would be immensely helpful for anyone who wants to use this feature, just keep the issue open as long as you need to, and when you get the chance to do so feel free to take a look at the code. I'm eager to see what kind of solution you come up with, if any.

@mcreekmore mcreekmore linked a pull request Jan 23, 2025 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants