Claudia 3dbb735f3c
Fix PKG installer environment
This commit solves an issue where the environment handed to
`/usr/sbin/installer` is not the same as the environment used by the
graphical PKG installer.

This is evident in some post-install scripts, e. g. the
`component-10.pkg/Scripts/postinstall` script in the `dymo-label`
cask. The code says:

```
USER_ID=`id -u ${USER}`

launchctl bootstrap gui/$USER_ID /Library/LaunchAgents/com.dymo.dls.webservice.plist
```

The graphical installer will export e. g. `USER=alice`, and
everything works as intended.

However, `brew cask install` does not override `sudo`’s default,
which is `USER=ROOT`. This violates the assumptions in the script.

This commit fixes the issue by configuring `sudo` to override the
following environment variables with the proper user name:

- `LOGNAME`
- `USER`
- `USERNAME`
2018-07-06 09:38:00 +02:00
..
2018-07-06 09:38:00 +02:00
2018-07-02 00:11:42 +02:00
2018-06-13 17:24:32 -07:00
2018-07-04 21:25:43 +10:00
2018-07-06 09:38:00 +02:00
2018-07-01 18:48:28 +02:00
2018-07-03 12:15:51 -04:00
2018-06-30 19:40:14 -04:00
2018-06-13 07:17:30 +02:00
2018-06-18 16:23:35 +02:00
2018-07-03 15:41:33 +01:00
2018-05-18 16:58:21 -07:00
2018-06-07 13:48:35 +02:00
2018-04-30 17:03:11 +02:00
2018-06-30 19:40:14 -04:00
2018-06-30 19:40:14 -04:00
2018-07-01 01:43:04 +02:00
2018-06-07 14:02:31 +02:00
2018-05-14 04:44:15 -05:00
2018-06-30 19:40:14 -04:00
2018-05-16 19:07:11 +02:00
2018-06-30 19:40:14 -04:00
2018-06-30 19:40:14 -04:00
2018-06-30 19:40:14 -04:00
2018-06-30 19:40:14 -04:00
2018-04-08 16:48:50 -07:00
2018-04-20 19:11:22 +02:00
2018-07-05 11:54:32 +02:00
2018-07-04 21:25:43 +10:00
2018-06-18 16:23:36 +02:00
2018-06-07 13:50:10 +02:00
2018-05-25 18:53:08 +02:00
2018-07-01 18:48:28 +02:00

Homebrew's Formula API

This is the (partially) documented public API for Homebrew.

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!