matthewjberger / scoop-nerd-fonts

A scoop bucket for installing nerd fonts
The Unlicense
353 stars 34 forks source link

(chore): let scoop handle admin rights checking and improve UX when the check fails #202

Closed jonz94 closed 1 year ago

jonz94 commented 1 year ago
  1. When using scoop install -g <app>, scoop will automatically check if current session have admin rights or not.
    • So I think we could take advantage of this behavior to let scoop handle admin rights checking for us.

scoop-check-admin-rights.png

  1. I also change the scripts when the admin rights check fails.

    • Before this PR, font will still be installed, and mark as "Install failed".
      before-refactor

    • After this PR, font will be uninstalled immediately, and then print out some details about what just happened to the user.
      after-refactor

jonz94 commented 1 year ago

/verify

github-actions[bot] commented 1 year ago

Your changes do not pass checks.

3270-NF-Mono

3270-NF

Agave-NF-Mono

Agave-NF

AnonymousPro-NF-Mono

AnonymousPro-NF

Anuphan

Arimo-NF-Mono

Arimo-NF

AurulentSansMono-NF-Mono

AurulentSansMono-NF

Bai-Jamjuree

BigBlueTerminal-NF-Mono

BigBlueTerminal-NF

BitstreamVeraSansMono-NF-Mono

BitstreamVeraSansMono-NF

Cascadia-Code

CascadiaCode-NF-Mono

CascadiaCode-NF

Chakra-Petch

Charm

Charmonman

ChenYuLuoYen-Thin

CodeNewRoman-NF-Mono

CodeNewRoman-NF

Cousine-NF-Mono

Cousine-NF

DaddyTimeMono-NF-Mono

DaddyTimeMono-NF

DejaVuSansMono-NF-Mono

DejaVuSansMono-NF

Delugia-Mono-Nerd-Font-Complete

Delugia-Mono-Nerd-Font

Delugia-Nerd-Font-Book

Delugia-Nerd-Font-Complete

Delugia-Nerd-Font

DroidSansMono-NF-Mono

DroidSansMono-NF

Fahkwang

FantasqueSansMono-NF-Mono

FantasqueSansMono-NF

FiraCode-NF-Mono

FiraCode-NF

FiraCode-Script

FiraCode

FiraMono-NF-Mono

FiraMono-NF

Font-Awesome

Go-Mono-NF-Mono

Go-Mono-NF

Gohu-NF-Mono

Gohu-NF

Hack-NF-Mono

Hack-NF

HakushuGyosyoOiwai

HakushuKaisyoOiwai

Hanamin

Hasklig-NF-Mono

Hasklig-NF

Hasklig

HeavyData-NF-Mono

HeavyData-NF

Hermit-NF-Mono

Hermit-NF

IBMPlexMono-NF-Mono

IBMPlexMono-NF

IBMPlexMono

IBMPlexSans-Arabic

IBMPlexSans-Condensed

IBMPlexSans-Devanagari

IBMPlexSans-Hebrew

IBMPlexSans-JP

IBMPlexSans-KR

IBMPlexSans-Thai-Looped

IBMPlexSans-Thai

IBMPlexSans

IBMPlexSerif

IPAex-Gothic

IPAex-Mincho

Inconsolata-NF-Mono

Inconsolata-NF

InconsolataGo-NF-Mono

InconsolataGo-NF

InconsolataLGC-NF-Mono

InconsolataLGC-NF

Iosevka-NF-Mono

Iosevka-NF

JetBrains-Mono

JetBrainsMono-NF-Mono

JetBrainsMono-NF

K2D

Kanit

KoHo

Kodchasan

Krub

LXGW-Bright-GB

LXGW-Bright-TC

LXGW-Bright

LXGWWenKai

LXGWWenKaiMono

LXGWWenKaiScreen

LXGWWenKaiScreenR

Lato

LeagueMono-static

LeagueMono-variable

Lekton-NF-Mono

Lekton-NF

LiberationMono-NF-Mono

LiberationMono-NF

MPlus-NF-Mono

MPlus-NF

Mali

Meslo-NF-Mono

Meslo-NF

Mitr

Monofur-NF-Mono

Monofur-NF

Monoid-NF-Mono

Monoid-NF

Mononoki-NF-Mono

Mononoki-NF

Niramit

Noto-CJK-Mega-OTC

Noto-NF-Mono

Noto-NF

Office-Code-Pro

Open-Sans

OpenDyslexic-NF-Mono

OpenDyslexic-NF

Overpass-NF-Mono

Overpass-NF

Pattaya

ProFont-NF-Mono

ProFont-NF

ProggyClean-NF-Mono

ProggyClean-NF

Prompt

Raleway

RobotoMono-NF-Mono

RobotoMono-NF

Rounded-L-Mplus

Rounded-Mplus

Rounded-X-Mplus

Sarabun

SarasaGothic-CL

SarasaGothic-HK

SarasaGothic-J

SarasaGothic-K

SarasaGothic-SC

SarasaGothic-TC

SarasaGothic-ttc-unhinted

SarasaGothic-ttc

SarasaGothic-unhinted

SarasaGothic

Setofont

ShareTechMono-NF-Mono

ShareTechMono-NF

Soukou-Mincho

Source-Han-Mega-OTC

Source-Han-Mono-HC

Source-Han-Mono-J

Source-Han-Mono-K

Source-Han-Mono-SC

Source-Han-Mono-TC

Source-Han-Noto-CJK-Ultra-OTC

Source-Han-Sans-HC

Source-Han-Sans-J

Source-Han-Sans-K

Source-Han-Sans-SC

Source-Han-Sans-TC

Source-Han-Serif-HC

Source-Han-Serif-J

Source-Han-Serif-K

Source-Han-Serif-SC

Source-Han-Serif-TC

SourceCodePro-NF-Mono

SourceCodePro-NF

SpaceMono-NF-Mono

SpaceMono-NF

Sriracha

Srisakdi

Tanuki-Permanent-Marker

Terminus-NF-Mono

Terminus-NF

Tinos-NF-Mono

Tinos-NF

Tiresias

Ubuntu-NF-Mono

Ubuntu-NF

UbuntuMono-NF-Mono

UbuntuMono-NF

Victor-Mono

VictorMono-NF-Mono

VictorMono-NF

Wenquanyi-Microhei

Wenquanyi-Zenhei

andika-compact

andika-new-basic

andika

basic-comical-nc

iA-Writer-NF-Mono

iA-Writer-NF

jf-open-huninn

taipei-sans