Giter VIP home page Giter VIP logo

choco-cica's People

Contributors

tignear avatar

Stargazers

 avatar

Watchers

 avatar

choco-cica's Issues

Add-Font or Remove-Font scripts calling directly.

I wrote the script referring to https://chocolatey.org/packages/fonts-ricty-diminished

I received the following comment.

Pauby (reviewer) on 16 Jul 2019 08:25:28 +00:00:

Hi,

My apologies as I should have brought this up last time!

In your chocolateyInstall.ps1 and chocolateyUninstall.ps1 you are calling powershell.exe -f with the Add-Font or Remove-Font scripts. Is there a reason you are doing this over just calling the scripts directly?

You are effectively launching PowerShell inside PowerShell which doesn't make a lot of sense
but there could be a reason for it?

I thought it was the best, so I decided to fix it.
Rewrote chocolateyUninstall.ps1 as follows.

$ErrorActionPreference = 'Continue';
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
 
$fonts =  Join-Path $toolsDir "fonts"
$removeFontScript=Join-Path $toolsDir "Remove-Font.ps1";
Get-ChildItem $fonts |ForEach-Object {&($removeFontScript) ([System.IO.Path]::GetFileName($_))}

However, this does not work well with the following output.

Chocolatey v0.10.15
Uninstalling the following packages:
cica

cica v5.0.1
Font: Cica-Bold (TrueType)
An error occured removing $'Cica-Bold.ttf'

You cannot call a method on a null-valued expression.
Font: Cica-BoldItalic (TrueType)
Font 'Cica-BoldItalic.ttf' removed successfully

Font: Cica-Regular (TrueType)
Font 'Cica-Regular.ttf' removed successfully

Font: Cica-RegularItalic (TrueType)
Font 'Cica-RegularItalic.ttf' removed successfully

'C:\Windows\Fonts\COPYRIGHT.txt' not found

'C:\Windows\Fonts\LICENSE.txt' not found

 Skipping auto uninstaller - No registry snapshot.
 cica has been successfully uninstalled.

Chocolatey uninstalled 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.