TheKevJames / puppet-homebrew

homebrew (+brewcask! +taps!) package installer and provider
https://forge.puppet.com/thekevjames/homebrew
Apache License 2.0
18 stars 44 forks source link

Tap adds taps that are already present #65

Closed jordigg closed 7 years ago

jordigg commented 7 years ago

There's an edge case when a tap contains homebrew- on the name that the module will re-add that tap even though is already present. This happens because when brew taps a tap with a name like that, the homebrew- is removed from the name.

To make it easier to understand here an example: brew tap improbable-io/homebrew-versions Will result in...

$ brew tap
improbable-io/versions

Therefore when the module checks if a tap is already present by comparing brew tap with the name of the tap we want to add, it will never match.

There are two possible fixes:

  1. Remove homebrew- from any tap name on the puppet manifest.
  2. Make sure the module can support this edge case by comparing against the name and the name minus the homebrew- part.

I think the sane way to proceed is the second one. Will submit a PR.