alcatraz / Alcatraz

Package manager for Xcode
alcatraz.io
MIT License
9.88k stars 1.15k forks source link

Fix install script's defaults read command #423

Closed guillaumealgis closed 8 years ago

guillaumealgis commented 8 years ago

This adresses two issues:

It silences the warning

The domain/default pair of (com.apple.dt.Xcode, DVTPlugInManagerNonApplePlugIns-Xcode-7.2) does not exist

already identified in #393. Hiding this error is fine, as it will only appear when the user never installed a plugin before. The problem is by using 2> /dev/null we're effectively silencing all other errors which might occur. If you have any idea how to prevent this, I'll amend the commit.


It uses xcode-select to know where to look for the Xcode app, instead of assuming /Applications/Xcode.app. This fixes the error

Couldn't find an application named "Xcode" defaults unchanged

brought up by @drduan in #419. I'm not very satisfied with the sed bit to trim out the /Contents/Developer part of the path returned by xcode-select. So again, any input welcome.

jurre commented 8 years ago

@kattrali I think you're the best person to comment on/help with this, would you mind? :smile:

kattrali commented 8 years ago

np, I can take a look later today

guillaumealgis commented 8 years ago

@kattrali I (finally) updated the install script following your comments. This makes the script a fair bit more complex, but works quite well. To make the error handling easier to maintain, I added comments to explain what the intent is, and documented some weird grep & defaults behaviors.

kattrali commented 8 years ago

@guillaume-algis no worries! thank you for taking the time to do this.