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 #199

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

Reopen as #202

Because "Pull Requests / Pull Request Validator (pull_request)" CI on this PR disappeared...

jonz94 commented 1 year ago

Ah... I totally forget about the /verify command...

Just leave a comment with /verify, like https://github.com/matthewjberger/scoop-nerd-fonts/pull/204#issuecomment-1289081304 Then, it will trigger the "Pull Requests / Pull Request Validator (pull_request)" CI for us.