brew update and retried your prior step?I tried to.
brew doctor, fixed as many issues as possible and retried your prior step?sudo chown -R $(whoami) $(brew --prefix)?I just installed OSX El Capitan and now brew update doesn't work. I have followed these instructions: https://ohthehugemanatee.org/blog/2015/10/01/how-i-got-el-capitain-working-with-my-developer-tools/
Then I tried things like changing permissions, pulling it from origin again and doing a hard reset, uninstalling Homebrew and installing it again, and so on. The error remains. I can run brew doctor and it doesn't report any errors other than a few unlinked files that I installed myself. I just can't run brew update (the whole problem started because I ran brew doctor and it recommended that I run brew update). Xcode is installed too. Anyway here's what shows up when I run brew update:
mv: rename /usr/local/Library/Taps/homebrew-versions, to /usr/local/Library/Taps/homebrew/homebrew-versions/homebrew-versions,: No such file or directory
/usr/local/Library/Homebrew/cmd/update.sh: line 58: ${#${tap_dir_basename//[^-]}}: bad substitution
And here's the content of line 58 and the following ones, in update.sh:
if [[ ${#${tap_dir_basename//[^\-]}} -gt 1 ]]
then
echo "Homebrew changed the structure of Taps like <someuser>/<sometap>." >&2
echo "So you may need to rename $HOMEBREW_LIBRARY/Taps/$user/homebrew-$repo manually." >&2
fi
else
echo "Homebrew changed the structure of Taps like <someuser>/<sometap>. " >&2
echo "$tap_dir is an incorrect Tap path." >&2
echo "So you may need to rename it to $HOMEBREW_LIBRARY/Taps/<someuser>/homebrew-<sometap> manually." >&2
fi
Any idea what this is about?
What is the output of ls -AlF /usr/local/Library/Taps and ls -AlF /usr/local/Library/Taps/*?
What is the output of
ls -AlF /usr/local/Library/Tapsandls -AlF /usr/local/Library/Taps/*?
Nevermind! I was able to reproduce this locally and fixed the bug. Thanks for reporting it! Can you please do the following one last time and report back whether it worked this time?
cd /usr/local
git checkout master
git fetch origin
git reset --hard origin/master
brew update
cc @xu-cheng Do 93e0f4f9465978460d411f27214e19ae3fc4d294 and 500f9eada854c1939bf9a0caf94085214c9399b0 need to be backported to Homebrew/legacy-homebrew?
@UniqMartin
It worked! Thank you!
@UniqMartin I think so. Thanks for catching this.
I think so. Thanks for catching this.
Done in https://github.com/Homebrew/legacy-homebrew/commit/43dda695290bb4fcc5ed458759ce797c41abb83e and https://github.com/Homebrew/legacy-homebrew/commit/f0b70e5725662377ea2feb14f59e407bd7071fe0.
Most helpful comment
Nevermind! I was able to reproduce this locally and fixed the bug. Thanks for reporting it! Can you please do the following one last time and report back whether it worked this time?