21 Commits

Author SHA1 Message Date
Douglas Eichelberger
90996e1997 git grep -lE '\(\&[A-Za-z._]+method\(:' | xargs gsed -i -E 's|\(\&([A-Za-z._]+)public_method\(:([a-z?_]+)\)\)| { \1\2(_1) }|g' 2024-03-03 18:55:32 -08:00
Ilya Kulakov
476d97934f sudo: change sudo_user to sudo_as_root. 2023-04-28 11:22:54 -07:00
Ilya Kulakov
d470661b37 sudo: add the sudo_user arg to SystemCommand. 2023-04-28 11:11:53 -07:00
Ilya Kulakov
563387a7b4 sudo: explicitly specify the root user where necessary
With sudoers one may override default sudo user. This mostly works
provided the admin configured the replacement appropriately. However
there are exceptions that absolutely must be run by root such as
/usr/sbin/installer and, under certain circumstances, /bin/launchctl.
2023-04-28 11:11:53 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Markus Reiter
5aa0dbe1f9
Move RMDIR_SH into separate file. 2021-04-02 03:01:08 +02:00
Max Mueggler
23376bad75
Speed up cask pkg uninstallation when there's many directories to delete.
Results in an order of magnitude speedup for uninstalling large packages such as mactex.
2021-04-02 03:01:07 +02:00
Markus Reiter
571208c8ee
Only call find on directories. 2021-04-02 03:01:07 +02:00
Lucendio
aceb021254 Move existence check into helper script
This way, it'll run as `root`, too.
2021-03-17 01:42:56 +01:00
Lucendio
7a22cda8dd
Fix broken rmdir script
Unfortunately, the removal shell script introduced in #10860 does not handle paths very well that dont exist, e.g.

* `find` runs before its `-exec` test, thus throws `find: "${path}": No such file or directory`
* it seem that `/bin/rmdir` is intended to break is certain cases, thus `-f` is not desired.
  so, if `${path}` does not exist, it'll still break, which is most likely not one of those cases.

This change reintroduces a check for existence. This way, it is ensured that there is actually
a directory to be removed when invoking the script.
2021-03-17 00:35:08 +01:00
Markus Reiter
1a4874dc62 Simplify package uninstallation. 2021-03-16 03:00:14 +01:00
Markus Reiter
0b6c31fc70 Add type signatures to Cask::Pkg. 2020-11-19 16:07:50 +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
Markus Reiter
b484ddc842 Document Pkg. 2020-08-26 03:13:59 +02:00
Markus Reiter
7084093d45 Add missing require. 2019-09-13 19:52:43 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00: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
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