docker-desktop: remove docker-compose linking#273061
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the Homebrew Cask-managed symlink that linked Docker Desktop’s bundled docker-compose CLI plugin into /usr/local/cli-plugins, aligning the cask with Docker Desktop’s own CLI plugin installation behavior and avoiding use of a nonstandard plugin directory.
Changes:
- Remove the
binarystanza that linkedDocker.app/Contents/Resources/cli-plugins/docker-composeto/usr/local/cli-plugins/docker-compose.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
In that case, wouldn't the correct fix be to update the directory to be the correct one? |
I don't know why Homebrew should even bother managing those symlinks. If it was up to me I'd leave it all to Docker Desktop itself :) Currently Docker Desktop installs 15 CLI plugin symlinks in Same goes for This list is slightly different from the one in this Cask. I don't know whether it's intentional, so I didn't touch it. But again, I'd probably just leave it to Docker devs to manage that :) |
|
From my understanding, there's two reasons;
|
This symlink is broken and it seems it's unnecessary at all.
Docker Desktop will create symlinks for CLI plugins on the first run, so this manual step seems unnecessary. On my machine, it created a symlink to
docker-composein~/.docker/cli-plugins/docker-composeanyways. And if I rundocker infoI see that Docker loads all CLI plugins from~/.docker/cli-pluginsand does not use/usr/local/cli-plugins/docker-compose.Also, according to Docker Compose CLI plugin manual installation instructions it should be placed in
/usr/local/lib/docker/cli-pluginsand not/usr/local/cli-plugins.I'm also not sure whether all the other symlinks created by this Cask in
/usr/local/binare necessary. Because even when they exist, Docker Desktop will still ask the user where to install CLI binaries. This functionality exists in Docker Desktop for a while already, so I think it's safe to simplify this Cask to just copyingDocker.app. That way it won't needsudo. Also, Docker Desktop can install all the binaries it needs in~/.docker/bin, so it's possible to install Docker Desktop withoutsudoat all, but this Cask forces global binaries. Don't know whether it's by design, or just a legacy.After making any changes to a cask, existing or new, verify:
brew audit --cask --online <cask>is error-free.brew style --fix <cask>reports no offenses.Additionally, if adding a new cask:
brew audit --cask --new <cask>worked successfully.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask>worked successfully.brew uninstall --cask <cask>worked successfully.zapstanza paths.