Skip to content

Commit

Permalink
fix: remove Brew lockfile references as support for it was removed up…
Browse files Browse the repository at this point in the history
…stream

See Homebrew/homebrew-bundle#1509 for details.
  • Loading branch information
Okeanos committed Dec 7, 2024
1 parent b5a5fd6 commit 01d0017
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ $RECYCLE.BIN/

### Custom Additions

### Homebrew lockfile
Brewfile.lock.json


### Node template (used by bats)
# Logs
logs
Expand Down
39 changes: 17 additions & 22 deletions do
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,24 @@ elif [[ "${args[0]}" == "link" ]]; then
fi

msg ""
msg "Installing Brewfile contents"
if [[ -f "${repository}/Brewfile.lock.json" ]]; then
msg "${YELLOW}A brew bundle lockfile ('${repository}/Brewfile.lock.json') exists, assuming all required tools are installed.${NOFORMAT}"
else
read -rp "Do you want to review the Brewfile now (y/n)? " -n 1
msg ""
if [[ ${REPLY} =~ ^[Yy]$ ]]; then
msg "Brewfile contents:"
msg "---"
echo "$(<"${repository}/Brewfile")"
msg "---"
fi
msg "Installing Brewfile ('${repository}/Brewfile') contents"
read -rp "Do you want to review the Brewfile now (y/n)? " -n 1
msg ""
if [[ ${REPLY} =~ ^[Yy]$ ]]; then
msg "Brewfile contents:"
msg "---"
echo "$(<"${repository}/Brewfile")"
msg "---"
fi

read -rp "Do you want to install the Brewfile contents (y/n)? " -n 1
msg ""
if [[ ${REPLY} =~ ^[Yy]$ ]]; then
# Upgrade any already-installed formulae.
brew upgrade
# Install everything inside Brewfile
brew bundle install --file "${repository}/Brewfile"
else
die "${RED}Aborting. The dotfiles require a number of tools from the Brewfile to work. Please update the Brewfile to your liking and run the installer again.${NOFORMAT}"
fi
msg "${RED}The dotfiles require a number of tools from the Brewfile to work. You can skip installing them here if you are sure everything is already set up as expected.${NOFORMAT}"
read -rp "Do you want to install the Brewfile contents (y/n)? " -n 1
msg ""
if [[ ${REPLY} =~ ^[Yy]$ ]]; then
# Upgrade any already-installed formulae.
brew upgrade
# Install everything inside Brewfile
brew bundle install --file "${repository}/Brewfile"
fi

msg ""
Expand Down

0 comments on commit 01d0017

Please sign in to comment.