pivotal / workstation-setup

Scripts to automatically set up a machine for development the "Tanzu Labs" way
https://github.com/pivotal/workstation-setup
MIT License
328 stars 247 forks source link

Customizing OS X configuration breaks on new VMware machine #308

Closed carpeliam closed 2 years ago

carpeliam commented 2 years ago

Steps to reproduce:

  1. Get a brand new VMware laptop
  2. Load pvtl image according to instructions at https://confluence.eng.vmware.com/pages/viewpage.action?pageId=766896300
  3. (not sure if this is required or not, but I happened to do this first) Upgrade to Monterey
  4. Install workstation-setup

I see the following output (snippet):

Customizing OS X configuration
==> Downloading https://ghcr.io/v2/homebrew/core/dockutil/manifests/2.0.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/dockutil/blobs/sha256:f5f87d9e2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring dockutil--2.0.5.all.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/dockutil
Target /usr/local/bin/dockutil
already exists. You may want to remove it:
  rm '/usr/local/bin/dockutil'

To force the link and overwrite all conflicting files:
  brew link --overwrite dockutil

To list all files that would be deleted:
  brew link --overwrite --dry-run dockutil

Possible conflicting files are:
/usr/local/bin/dockutil
==> Summary
🍺  /usr/local/Cellar/dockutil/2.0.5: 4 files, 37.9KB

It then dumps me back to a terminal prompt. I'd expect this to not fail loudly when trying to install dockutil, but to keep on going with the setup.

I was able to work around this by commenting out the line that installed dockutil, though I'm not sure what the best solution might be; maybe bring back the if [ ! -e /usr/local/bin/dockutil ]; then block, or otherwise not fail loudly as is the case elsewhere?

Happy to chat more about this particular machine setup if that's interesting.

joemoore commented 2 years ago

I saw this with 6a4b890038644bc178b944fb98ebf9af444cc6a1 and erroneously thought it was because I already had a version of dockutil installed from a previous run of workstation_setup. We should fix this.

joemoore commented 2 years ago

@textbook can you please take a look?

joemoore commented 2 years ago

65c657068af82e78c2deb5d078e3bfd551f7bac1 should fix this.

textbook commented 2 years ago

Yep, that should do it, but where was the other dockutil coming from on a clean machine 🤔