6 Commits

Author SHA1 Message Date
Mike McQuaid
69c7a20896 Fix brew edit with environment filtering.
For many people `brew edit` makes use of the `EDITOR` variable to pick a
sensible editor. With environment filtering enabled unless this editor
is found in the default system PATH it'll fall back to e.g. `vim`.

Instead, ensure that we export the original, pre-filtering `PATH` as
`HOMEBREW_PATH` and use that internally to locate the editor. In future
this same approach will likely be used for requirements to be able to
find tools, too, and for other variables which we want to expose to
Homebrew itself but not other build tools.

Note that `HOMEBREW_PATH` is the same as `PATH` when build filtering
hasn't been enabled.
2017-04-21 18:26:12 +01:00
Markus Reiter
44d367edca Deprecate #plural. 2017-03-11 21:16:37 +01:00
Markus Reiter
a554902380 Add mktmpdir helper method. 2017-02-28 15:06:32 +01:00
Jeppe Toustrup
ebaf3cdc6a Add 'B' for bytes to cleanup command output
When `brew cleanup` is run it prints out a message like the following:

> This operation has freed approximately 222M of disk space.

The '222M' refers to megabytes but the normal acronym for megabytes would be
'MB'. The 'B' is also missing from kilobytes and gigabytes in the output, so
that's what this commit adds.
2017-02-25 11:30:46 +00:00
Markus Reiter
44d2617030 Handle Homebrew.failed in spec_helper. 2017-02-19 18:41:53 +01:00
Markus Reiter
05a98f24c4 Convert Utils test to spec. 2017-02-19 18:41:53 +01:00