7 Commits

Author SHA1 Message Date
Markus Reiter
355df64d93 Use SystemCommand for curl. 2018-07-29 01:23:33 +02:00
Markus Reiter
28384ba518 Rename Hbc::SystemCommand to SystemCommand. 2018-07-22 21:11:47 +02:00
Markus Reiter
a9e109e31a Don’t expand executable path in SystemCommand. 2018-07-14 02:33:42 +02:00
Markus Reiter
37f3a603ce Use env utility instead of with_env. 2018-07-11 16:46:33 +02:00
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
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Markus Reiter
b9c9f0f687 Move Cask test helpers to test/support. 2017-03-05 19:13:06 +01:00