Brew: Terminal polluted with git related output

Created on 12 Jul 2017  Â·  7Comments  Â·  Source: Homebrew/brew

  • [x] Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new
  • [x] Ran brew update and retried your prior step?
  • [x] Ran brew doctor, fixed all issues and retried your prior step?
  • [x] Ran brew config and brew doctor and included their output with your issue?
$î‚° brew config
HOMEBREW_VERSION: 1.2.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: b5529084906af89827f6d9befd613457a1615918
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 0c01916d2beeeeb83495f9d20f7227a3abb21d06
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.13.2 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.26.0/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/phnl310034430/.rbenv/shims/ruby => /Users/phnl310034430/.rbenv/versions/2.4.1/bin/ruby
Java: 1.8.0_131, 1.8.0_121
macOS: 10.12.4-x86_64
Xcode: N/A
CLT: 8.3.2.0.1.1492020469
X11: 2.7.11 => /opt/X11
$ brew doctor
Your system is ready to brew.

When I run the following command: brew update && brew upgrade && brew cleanup, before actually updating/upgrading stuff, my terminal is polluted with stuff like this:

/usr/local/Homebrew/.git/FETCH_HEAD Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 80,
  rdev: 0,
  blksize: 4096,
  ino: 714081,
  size: 4921,
  blocks: 16,
  atime: 2017-07-12T14:48:13.000Z,
  mtime: 2017-07-12T14:48:13.000Z,
  ctime: 2017-07-12T14:48:13.000Z,
  birthtime: 2017-01-11T12:51:10.000Z }
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts/.git/FETCH_HEAD Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 80,
  rdev: 0,
  blksize: 4096,
  ino: 5453654,
  size: 104,
  blocks: 8,
  atime: 2017-07-12T14:48:13.000Z,
  mtime: 2017-07-12T14:48:13.000Z,
  ctime: 2017-07-12T14:48:13.000Z,
  birthtime: 2017-04-25T12:31:18.000Z }
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/.git/FETCH_HEAD Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 80,
  rdev: 0,
  blksize: 4096,
  ino: 1298987,
  size: 13077,
  blocks: 32,
  atime: 2017-07-12T14:48:13.000Z,
  mtime: 2017-07-12T14:48:13.000Z,
  ctime: 2017-07-12T14:48:13.000Z,
  birthtime: 2017-01-11T16:01:51.000Z }
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 80,
  rdev: 0,
  blksize: 4096,
  ino: 819800,
  size: 103,
  blocks: 8,
  atime: 2017-07-12T14:48:13.000Z,
  mtime: 2017-07-12T14:48:13.000Z,
  ctime: 2017-07-12T14:48:13.000Z,
  birthtime: 2017-01-11T14:37:30.000Z }
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/.git/FETCH_HEAD Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 80,
  rdev: 0,
  blksize: 4096,
  ino: 5292010,
  size: 107,
  blocks: 8,
  atime: 2017-07-12T14:48:13.000Z,
  mtime: 2017-07-12T14:48:13.000Z,
  ctime: 2017-07-12T14:48:13.000Z,
  birthtime: 2017-04-24T09:57:54.000Z }
Already up-to-date.

The commands get executed perfectly fine but I think this logging is not needed.

The output of brew --version is

$ brew --version
Homebrew 1.2.4
Homebrew/homebrew-core (git revision 0c01; last commit 2017-07-12)

Most helpful comment

It's a side-effect of having the touch npm module installed globally - if you have something like nvm set up in your ~/.zshrc, then the binary in the touch module is overriding the standard /usr/bin/touch (bad idea to name the binary touch, npm module authors). I still haven't tracked down exactly which package depended on it and thus put it in the path, but after uninstalling several different global modules, it cleared up the issue.

~In case you want to go digging, it was one of these modules that depended on touch: documentation, grunt-cli, pkg, snyk, typescript, typings~

The culprit was the typings npm module - installing it globally installs touch globally as well.

All 7 comments

Try moving ~/.gitconfig somewhere else and see if it still happens.

@ilovezfs I temporarily renamed the file and restarted my terminal session but this still happens. I'm now seeing that @thiagodebastos has the same issue in #2811

@mmjmanders the next thing to try is moving your .bash_profile out of the way (assuming you're using bash).

I am using zsh with (of course) oh-my-zsh. After removing the ~/.zshrc file the messages disappeared. Now to figure out which plugin is causing this...

It's a side-effect of having the touch npm module installed globally - if you have something like nvm set up in your ~/.zshrc, then the binary in the touch module is overriding the standard /usr/bin/touch (bad idea to name the binary touch, npm module authors). I still haven't tracked down exactly which package depended on it and thus put it in the path, but after uninstalling several different global modules, it cleared up the issue.

~In case you want to go digging, it was one of these modules that depended on touch: documentation, grunt-cli, pkg, snyk, typescript, typings~

The culprit was the typings npm module - installing it globally installs touch globally as well.

So the issue for me ended up being typings, which depends on touch@^1.0.0. Version 2.0 and later of touch have renamed the binary to nodetouch, so upgrading should fix the issue. I have opened an issue for typings that should resolve that specific case: https://github.com/typings/core/issues/195.

@jacobwgillespie I am using nvm and noticed through which touch and ll $(which touch) that yarn had created a symlink which was overriding my standard touch. I uninstalled yarn, but the symlinks remained. After removing those, though, everything was back to normal. Thanks for the tip.

Was this page helpful?
0 / 5 - 0 ratings