You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm tracking my .Brewfile in git and I see occasionally packages move around. I'm not sure how things are sorted currently, but could it be done on package name?
It's a topological sort. The ordering is important as otherwise you'll install dependencies in the not the order specified in the Brewfile.
Fair enough. Although, I think that as long as tap remains at the top then it's fine. FWIW I have done the following:
#!/usr/bin/env bash
BREW_FILE=$HOME/.Brewfile
BREW_TYPES=(
tap
brew
cask
mas
)
TMP_FILE=/tmp/.Brewfile_unsorted
# update homebrew list
brew bundle dump --force --file $TMP_FILE# sort the final output## clear current contents>$BREW_FILEfortypein${BREW_TYPES[@]};do## extract lines starting with "type" and sort them
grep --dereference-recursive "^${type}"$TMP_FILE| sort >>$BREW_FILEdone## remove temporary file
rm $TMP_FILE
It's fine if you're happy for dependencies to be installed not when the Brewfile things they will be but before that and the error messages to not be clear about what package has failed to install.
I'm tracking my
.Brewfile
ingit
and I see occasionally packages move around. I'm not sure how things are sorted currently, but could it be done on package name?I'm running the command
brew bundle dump --describe --force --file $HOME/.Brewfile
The text was updated successfully, but these errors were encountered: