zunderscore / chocolatey-packages

Chocolatey package build scripts
MIT License
1 stars 1 forks source link

[Cascadia Code] Uninstaller always try to uninstall legacy font #17

Closed CookieHCl closed 3 years ago

CookieHCl commented 3 years ago

image

I don't have legacy font(Cascadia.ttf), and I only have current font(CascadiaCode.ttf).
However, since uninstaller always try to uninstall legacy font, uninstall always fail with WARNING: File Path 'C:\Windows\Fonts\Cascadia.ttf' does not exist! and Error uninstalling legacy Cascadia Code font.

Why don't you check existence before uninstalling legacy font?

zunderscore commented 3 years ago

Because of how font management works via command line, it's not always possible or reliable to check existence before attempting to uninstall. That's why this is a warning and not an error. Closing, as this is by design.

CookieHCl commented 3 years ago

@zunderscore I didn't know that... But it seems failure during uninstalling legacy font raises error instead of warning!

zunderscore commented 3 years ago

@CookieHCl Yes, that's if the process fails unexpectedly, like when you don't run the choco command as an administrator. When running as admin, even if the font file doesn't exist, there should be no error as the Uninstall-ChocolateyFont command will simply skip non-existent files.

I just tested this in my local environment which has never had the legacy font and it had no issues.

image

Keeping this closed.