43 Commits

Author SHA1 Message Date
Carlos Sanchez
278bc77f2d fix: launchctl list can return empty id
causing

Error: undefined method `match?' for nil:NilClass

Seen in macOS Big Sur
2020-11-24 18:12:10 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Markus Reiter
5426e47579 Document Artifact. 2020-08-26 03:13:59 +02:00
Maxime Garcia
65bb03a7db Fix uninitialized constant Cask::Pkg 2020-07-27 18:04:29 +02:00
Jonathan Chang
76709d82c5 Fix brew style. 2020-07-13 23:24:14 +10:00
Markus Reiter
b2ccf3ba78
Merge pull request #7587 from Rylan12/cask-zap-full-disk-access
brew cask zap prompt when Full Disk Access is needed
2020-05-31 23:41:25 +02:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Rylan Polster
d0bd687a3d brew cask zap prompts when Full Disk Access is needed 2020-05-21 10:24:28 -04:00
Daniel Bayley
f3a0fcfb6d Make rmdir: recursive 2020-02-11 07:56:15 +00:00
Markus Reiter
04493e2dde Fix trash.swift without arguments. 2019-10-23 06:59:39 +02:00
Markus Reiter
7a5e4d1269 Remove User::automation_access?. 2019-10-22 07:38:35 +02:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
L. E. Segovia
1ddafee614
Cask: address @reitermarkus's comments 2019-10-03 20:16:01 +00:00
L. E. Segovia
70c49809fe
Cask: typo in trash_paths 2019-10-02 14:09:26 +00:00
L. E. Segovia
b9a3884ebf
Cask: output files requiring sudo to console 2019-10-02 13:36:05 +00:00
L. E. Segovia
aa85bec73e
Fix style issues 2019-10-02 00:25:38 +00:00
L. E. Segovia
f980ac82b9
Cask: refuse to trash root-owned files
These files cannot be trashed from CLI without sudo, which trashes them
instead to root's Trash. AppleScript isn't of use here because it will
break Travis (as it will fail when asking for admin permissions).

Fixes homebrew/homebrew-cask#69897
2019-10-01 11:12:23 +00:00
Markus Reiter
d8afed206f Use AppleScript to check if GUI apps are running. 2019-09-15 01:37:04 +02:00
Markus Reiter
f010aa48ff Skip AppleScript actions if Automation Access isn't granted. 2019-09-13 16:35:44 +02:00
Markus Reiter
d5cc46f931 Support deleting login items by path. 2019-08-12 23:56:26 +02:00
L. E. Segovia
a5fc2ec834
Skip :trash step if no paths exist
Fixes Homebrew/cask#63583
2019-05-21 12:56:23 +00:00
L. E. Segovia
93b2c29612 Port file trashing to Swift
This avoids hitting AppleScript timeouts in CI.
2019-05-09 20:03:31 +00:00
Steven Peters
1406ee7eac abstract_uninstall: add timeout to trash_paths 2019-05-09 20:03:31 +00:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Markus Reiter
42d90f8bd9 Use same logic for installer script: and uninstall script:. 2019-03-03 06:21:11 +01:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Markus Reiter
0fcc62db31 Run uninstall rmdir: after uninstalling artifacts. 2019-02-08 01:09:48 +01:00
Markus Reiter
785ffb1b2c Refactor tests for uninstall stanza. 2018-11-07 18:44:52 +01:00
Markus Reiter
f61b963744 Improve application quitting. 2018-11-07 18:44:52 +01:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Markus Reiter
e7b1feefe8 Don’t remove login items on upgrade. 2018-10-25 01:05:53 +02:00
Markus Reiter
c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Markus Reiter
2308f0c571 Skip quitting applications when not logged into GUI. 2018-10-02 16:27:45 +02:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Markus Reiter
171ea3fe56 Ensure Pkg is namespaced correctly. 2018-09-06 09:30:00 +02:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00