timsutton / osx-vm-templates

macOS templates for Packer and VeeWee.
MIT License
1.12k stars 248 forks source link

support for Catalina softwareupdate output #101

Open w0de opened 4 years ago

w0de commented 4 years ago

In Catalina, the output for software update appears so:

Software Update Tool

Finding available software
Software Update found the following new or updated software:
* Label: Command Line Tools for Xcode-11.2
    Title: Command Line Tools for Xcode, Version: 11.2, Size: 224942K, Recommended: YES,
* Label: Command Line Tools for Xcode-11.3
    Title: Command Line Tools for Xcode, Version: 11.3, Size: 224878K, Recommended: YES,

softwareupdate -i expect "Command Line Tools for Xcode-11.2" not "Label: Command Line Tools for Xcode-11.2". Support for Mojave/High Sierra is preserved, since the added sed pipe won't change output without "Label: ".

herbota commented 3 years ago

I also encountered this issue when installing Command Line Tools for Xcode in Catalina. This change fixed that.