Hi. I'm zunder. And I'm terrible at intros.
zunderscore / chocolatey-packages Goto Github PK
View Code? Open in Web Editor NEWChocolatey package build scripts
License: MIT License
Chocolatey package build scripts
License: MIT License
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?
Likely related to @zunderscore 's Disqus comments on the choco repo page.
A new version of Cascadia released recently. When I tried to update this package with choco, I got something like the error below. I then choco uninstall
ed it and then tried to do a fresh choco install
, and still get the error below.
Any ideas? Thanks for maintaining!
C:\WINDOWS\system32>choco install cascadiacodepl -y
Chocolatey v0.10.15
Installing the following packages:
cascadiacodepl
By installing you accept licenses for the packages.
Progress: Downloading cascadiacodepl 2005.15... 100%
cascadiacodepl v2005.15 [Approved]
cascadiacodepl package files install completed. Performing other installation steps.
Attempting to uninstall previous version of Cascadia Code PL font...
WARNING: An error occured removing 'CascadiaCodePL.ttf'.
ERROR: You cannot call a method on a null-valued expression.
The install of cascadiacodepl was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- cascadiacodepl (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'.
See log for details.
Log:
2020-05-19 08:05:16,441 9500 [DEBUG] - ---------------------------Script Execution---------------------------
2020-05-19 08:05:16,443 9500 [DEBUG] - Running 'ChocolateyScriptRunner' for cascadiacodepl v2005.15 with packageScript 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\cascadiacodepl', installArguments: '', packageParameters: '',
2020-05-19 08:05:16,448 9500 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'
2020-05-19 08:05:16,451 9500 [INFO ] - Attempting to uninstall previous version of Cascadia Code PL font...
2020-05-19 08:05:16,513 9500 [DEBUG] -
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
namespace FontResource {
public class AddRemoveFonts {
private static IntPtr HWND_BROADCAST = new IntPtr(0xffff);
[DllImport("gdi32.dll")]
static extern int AddFontResource(string lpFilename);
[DllImport("gdi32.dll")]
static extern int RemoveFontResource(string lpFileName);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = true)]
private static extern bool PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam);
public enum WM : uint {
FONTCHANGE = 0x001D
}
public static int AddFont(string fontFilePath) {
FileInfo fontFile = new FileInfo(fontFilePath);
if (!fontFile.Exists) { return 0; }
try {
int retVal = AddFontResource(fontFilePath);
bool posted = PostMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
catch { return 0; }
}
public static int RemoveFont(string fontFileName) {
try {
int retVal = RemoveFontResource(fontFileName);
bool posted = PostMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
catch { return 0; }
}
}
}
2020-05-19 08:05:16,768 9500 [WARN ] - WARNING: An error occured removing 'CascadiaCodePL.ttf'.
2020-05-19 08:05:16,782 9500 [ERROR] - ERROR: You cannot call a method on a null-valued expression.
2020-05-19 08:05:16,785 9500 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '''] exited with '-1'.
2020-05-19 08:05:16,787 9500 [DEBUG] - Calling command ['"C:\WINDOWS\System32\shutdown.exe" /a']
2020-05-19 08:05:16,884 9500 [DEBUG] - Command ['"C:\WINDOWS\System32\shutdown.exe" /a'] exited with '1116'
2020-05-19 08:05:16,973 9500 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\cascadiacodepl'
2020-05-19 08:05:16,975 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\cascadiacodepl.nupkg'
with checksum 'EC360018747EB197A32D15A1E9E282BE'
2020-05-19 08:05:16,975 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\cascadiacodepl.nuspec'
with checksum '87799D2F873803D5D8C0438F61550519'
2020-05-19 08:05:16,977 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\files\CascadiaCodePL.ttf'
with checksum 'FE5B88167E5951CC780EC6354E7564F3'
2020-05-19 08:05:16,978 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'
with checksum '26858AD96C14802FD072D5F0CDA592D9'
2020-05-19 08:05:16,978 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyuninstall.ps1'
with checksum '0E2A561C754BADB3108B317BA9A41C24'
2020-05-19 08:05:16,979 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\LICENSE.txt'
with checksum '1DA97C42681B601447775D1051FBCDF9'
2020-05-19 08:05:16,980 9500 [DEBUG] - Found 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\VERIFICATION.txt'
with checksum '11A5318EF948414742C4AC08FD016F15'
2020-05-19 08:05:16,990 9500 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\cascadiacodepl.2005.15\.arguments".
2020-05-19 08:05:16,991 9500 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\cascadiacodepl.2005.15\.extra".
2020-05-19 08:05:16,992 9500 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\cascadiacodepl.2005.15\.version".
2020-05-19 08:05:16,992 9500 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\cascadiacodepl.2005.15\.sxs".
2020-05-19 08:05:16,993 9500 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\cascadiacodepl.2005.15\.pin".
2020-05-19 08:05:16,994 9500 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2020-05-19 08:05:16,995 9500 [ERROR] - The install of cascadiacodepl was NOT successful.
2020-05-19 08:05:16,998 9500 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'.
See log for details.
2020-05-19 08:05:17,000 9500 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\cascadiacodepl'
to 'C:\ProgramData\chocolatey\lib-bad\cascadiacodepl'
2020-05-19 08:05:19,004 9500 [DEBUG] - Attempting to delete file "C:\Users\cbarre7\AppData\Local\NuGet\Cache\cascadiacodepl.2005.15.nupkg".
2020-05-19 08:05:19,011 9500 [WARN ] -
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2020-05-19 08:05:19,013 9500 [INFO ] -
2020-05-19 08:05:19,014 9500 [ERROR] - Failures
2020-05-19 08:05:19,015 9500 [ERROR] - - cascadiacodepl (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyinstall.ps1'.
See log for details.
2020-05-19 08:05:19,017 9500 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2020-05-19 08:05:19,033 9500 [DEBUG] - Exiting with -1
choco uninstall cascadiacode cascadiacodepl
exits with error code 1 leading to the uninstallation being unsuccessful.
Here is the output:
Chocolatey v0.10.15
Uninstalling the following packages:
cascadiacode;cascadiacodepl
cascadiacode v2005.15
Uninstalling legacy Cascadia Code font...
WARNING: File Path 'C:\Windows\Fonts\Cascadia.ttf' does not exist!
ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Error uninstalling legacy Cascadia Code font
cascadiacode uninstall not successful.
Error while running 'C:\ProgramData\chocolatey\lib\cascadiacode\tools\chocolateyuninstall.ps1'.
See log for details.
cascadiacode not uninstalled. An error occurred during uninstall:
cascadiacode uninstall not successful.
cascadiacodepl v2005.15
Uninstalling legacy Cascadia Code PL font...
WARNING: File Path 'C:\Windows\Fonts\CascadiaPL.ttf' does not exist!
ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Error uninstalling legacy Cascadia Code PL font
cascadiacodepl uninstall not successful.
Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyuninstall.ps1'.
See log for details.
cascadiacodepl not uninstalled. An error occurred during uninstall:
cascadiacodepl uninstall not successful.
Chocolatey uninstalled 0/2 packages. 2 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- cascadiacodepl (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cascadiacodepl\tools\chocolateyuninstall.ps1'.
See log for details.
- cascadiacode (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cascadiacode\tools\chocolateyuninstall.ps1'.
See log for details.
If a package uninstall is failing and/or you've already uninstalled the
software outside of Chocolatey, you can attempt to run the command
with `-n` to skip running a chocolateyUninstall script, additionally
adding `--skip-autouninstaller` to skip an attempt to automatically
remove system-installed software. This will only remove the packaging
files and not things like software installed to Programs and Features.
If a package is failing because it is a dependency of another package
or packages, then you may first need to consider if it needs removed
as it is typically installed as a dependency for a reason. If you
decide that you still want to remove it, head into
`$env:ChocolateyInstall\lib` and find the package folder you want
removed. Then delete the folder for the package. This option should
only be used as a last resort.
Info: Process exited with code 1
I believe this has to do something with the legacy font not being present when uninstalling. From the install scripts and uninstall scripts, I have yet to understand what this legacy font means. If this a filename error, please guide me on how to fix this. I will also be happy to send a PR to fix this for all users of this package.
Can you please upgrade to https://github.com/microsoft/cascadia-code/releases/tag/v2009.22?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.