Commit Graph
31 Commits
Author SHA1 Message Date
Markus Reiter d7be7d038a Document SystemCommand. 2020-08-26 03:13:59 +02:00
Mike McQuaid 3a91c37e66 Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Markus Reiter 490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Jonathan Chang 76709d82c5 Fix brew style. 2020-07-13 23:24:14 +10:00
Mike McQuaid bc27e38f18 Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Gautham Goli acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
Issy Long 1f6168fe8a Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long 341ea60807 Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Issy Long b78028b9c2 Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
Mike McQuaid 8a8fc68264 Ruby 2.6.3 brew tests fixes 2019-10-08 17:39:31 +01:00
Markus Reiter 7f39d333bc Move assert_success to SystemCommand::Result. 2019-10-04 23:39:25 +02:00
Cheng XU 1d957c2029 system_command: automatically find secrets from ENV 2019-07-18 15:10:15 +08:00
Cheng XU 9232ca4508 system_command: allow redacting secrets in the log
Add a new argument `secrets` to specify secret tokens, so we can redact them in the log.
2019-07-18 15:06:32 +08:00
Mike McQuaid 36dbad3922 Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid e095da4d01 rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Markus Reiter 2308f0c571 Skip quitting applications when not logged into GUI. 2018-10-02 16:27:45 +02:00
Mike McQuaid a11fe57cd2 cache_store: handle corrupt DBM database.
When the DBM database cannot be read by the current version of Ruby's
DBM library (due to corruption or another incompatibility) it segfaults
or freezes which takes down the entire Homebrew Ruby process.

This isn't desirable so instead perform a shell out with the Homebrew
Ruby to see if it can read the DBM database before we try to use the
information. If this hangs or crashes: silently delete the database and
recreate it.
2018-09-20 10:57:27 +01:00
Markus Reiter 91b0794329 Add SystemCommand::Result#merged_output. 2018-09-19 04:02:59 +02:00
Markus Reiter e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid d7eca0b57c Use Bundler to manage vendor directory
Rather than having to manually keep track of what version each thing in
here is and copy files around by hand on update let's use Bundler's
standalone mode and careful use of `.gitignore` to help us do it.

This means a `bundle update --standalone` will allow us to update all
gems in vendor.

We could consider vendoring other gems this way in future but I'd
suggest only doing this for gems with no dependencies or at least gems
with no native extensions. The only gem this applies to that we
currently use is `ruby-prof` and I'm not convinced it's widely used
enough to warrant vendoring for everyone. Perhaps that's another
criteria: it should be functionality that's used by non-developer
commands and/or normal Homebrew usage.
2018-09-13 15:24:18 +01:00
Markus Reiter 32ad22395b Remove some #popen_reads. 2018-09-04 05:16:59 +02:00
Markus Reiter ad7054cc88 Fix executable with spaces. 2018-08-29 19:30:08 +02:00
Markus Reiter 81939dc496 Pass verbose to unpack strategies. 2018-08-02 15:52:55 +02:00
Markus Reiter 2d06497d9a Add verbose to SystemCommand verbosity. 2018-08-02 15:47:47 +02:00
Markus Reiter 8ae284e871 Use SystemCommand for curl. 2018-08-01 01:04:42 +02:00
ilovezfsandGitHub cd2b85c40f Revert "Use SystemCommand for curl." 2018-07-29 21:45:04 -07:00
Markus Reiter 355df64d93 Use SystemCommand for curl. 2018-07-29 01:23:33 +02:00
Markus Reiter 1d167a6b9f Reraise SystemCallError as ErrorDuringExecution. 2018-07-24 16:44:27 +02:00
Markus Reiter eccd20e276 Merge Hbc::Container classes into UnpackStrategy. 2018-07-24 16:44:27 +02:00
Markus Reiter e5e8033145 Add system_command helpers. 2018-07-22 23:24:18 +02:00
Markus Reiter 28384ba518 Rename Hbc::SystemCommand to SystemCommand. 2018-07-22 21:11:47 +02:00