16 Commits

Author SHA1 Message Date
Mike McQuaid
234e4aec96
Improve use of default_prefix? in tests. 2019-01-21 14:33:56 +00:00
Mike McQuaid
7615d3a812
Improve writable directory handling
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.

Fixes #4626.
2018-09-06 18:38:43 +01:00
William Woodruff
367629d289
utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-04 11:03:32 -04:00
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Markus Reiter
98bc356a59 Use Pathname#/. 2018-07-04 02:26:36 +02:00
Markus Reiter
18e46b3ec2 Fix usage of HOMEBREW_LOAD_PATH. 2018-06-18 16:23:35 +02:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
e03f07f302 Rubocop 0.53.0 automatic fixes. 2018-03-08 14:10:02 +00:00
Bob W. Hogg
3cd869651b Add test fixtures for ELF executables
Add test/support/fixtures/elf/
and test/support/fixtures/tarballs/testball-0.1-linux.tbz
2017-11-26 08:37:57 -08:00
Mike McQuaid
57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
e1bbab6ca6 Revert "Merge pull request #2603 from MikeMcQuaid/tweak-gem-vendoring"
This reverts commit 2372872974d1049c2beafe7dedb7f8f882502058, reversing
changes made to 3e4547f52e7ebec633f8bfefc8a396d944edf908.
2017-05-07 17:28:37 +01:00
Mike McQuaid
33f83be10e Tweak Gem vendoring.
If people have `HOMEBREW_RUBY_PATH` set then things explode in a rather
confusing fashion. Instead, run `bundle` for them with the arguments
that they'd want.

Also, move `macho` requires into the module itself; it's a pain having
to do everything for Bundler before requiring `pathname` which is a core
Ruby class.
2017-05-07 15:33:54 +01:00
Mike McQuaid
ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Markus Reiter
e70d28cba1 Add test to check if rubocop-cask version is is outdated. 2017-02-12 23:06:35 +01:00
Markus Reiter
cdcf362fc0 Add spec_helper. 2017-02-11 15:59:54 +01:00
Markus Reiter
4db1317f38 Move all remaining fixtures to test/support/fixtures. 2016-11-16 23:52:38 +01:00