7 Commits

Author SHA1 Message Date
Markus Reiter
1f5311888e Add failing spec for SystemCommand. 2018-07-11 15:58:38 +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
Claudia
79682df8b6
Re-enable tests by removing a stray rspec :focus 2018-07-02 16:01:01 +02:00
Markus Reiter
44f56a0773 Refactor join("") to join. 2018-06-15 13:56:08 +02:00
Markus Reiter
502b393d66 Fix tests. 2018-06-14 22:45:20 +02:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Markus Reiter
9fc6c7b2be Move Cask specs into brew tests. 2017-03-05 23:08:14 +01:00