I have a brew install carthage step that worked as of Build-agent version 0.1.1250-22bf9f5d (2018-12-12T11:32:15+0000), but no longer does under Build-agent version 0.1.1301-dd8e9365 (2019-01-09T17:12:43+0000)
Error being:
/usr/local/Homebrew/Library/Homebrew/config.rb:39:in initialize': no implicit conversion of nil into String (TypeError) from /usr/local/Homebrew/Library/Homebrew/config.rb:39:innew’
from /usr/local/Homebrew/Library/Homebrew/config.rb:39:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/local/Homebrew/Library/Homebrew/global.rb:25:in<top (required)>’
from /usr/local/Homebrew/Library/Homebrew/brew.rb:13:in require_relative' from /usr/local/Homebrew/Library/Homebrew/brew.rb:13:in’
Exited with code 1
This looks to be related to auto-updates performed by brew install prior to running. Versions of brew on the macOS images may be older and run into issues during auto updates. You can resolve this issue by running brew update prior to your brew install or prevent auto-updates with HOMEBREW_NO_AUTO_UPDATE=1 brew install package-name.