You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a function to test if we need to install the CLT, but am wondering at what point do we call it and do the installation. I'm guessing every single one of our dependencies probably needs the Xcode CLT on MacOS, so, I guess we put it near the beginning of install.sh? Here is a function to detect if CLT are missing:
ifshould_install_command_line_tools?ohai"Searching online for the Command Line Tools"# This temporary file prompts the 'softwareupdate' utility to list the Command Line Toolsclt_placeholder="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"sudo"/usr/bin/touch",clt_placeholderclt_label=`softwareupdate -l | grep -B 1 -E "Command Line (Developer|Tools)" | awk -F"*" '/^ +\\*/ {print $2}' | sed 's/^ *//' | tail -n1`.chompohai"Installing #{clt_label}"sudo"/usr/sbin/softwareupdate","-i",clt_labelsudo"/bin/rm","-f",clt_placeholdersudo"/usr/bin/xcode-select","--switch","/Library/Developer/CommandLineTools"end# Headless install may have failed, so fallback to original 'xcode-select' methodifshould_install_command_line_tools? && STDIN.tty?ohai"Installing the Command Line Tools (expect a GUI popup):"sudo"/usr/bin/xcode-select","--install"puts"Press any key when the installation has completed."getcsudo"/usr/bin/xcode-select","--switch","/Library/Developer/CommandLineTools"endabort<<-EOABORTif`/usr/bin/xcrun clang 2>&1` =~ /license/ && !$?.success?You have not agreed to the Xcode license.Before running the installer again please agree to the license by openingXcode.app or running: sudo xcodebuild -licenseEOABORT
My ruby, while poor, is good enough to translate that to bash, I believe... or come up with our own version.
The text was updated successfully, but these errors were encountered:
@zbeekman Possibly we can knock this out relatively quickly in a pair programming session or mark it as "won't fix" and close it. I'll bel glad to help with modifying the installation scripts if we decide to fix this. Thoughts?
See, for example how the homebrew installer handles this.
I have written a function to test if we need to install the CLT, but am wondering at what point do we call it and do the installation. I'm guessing every single one of our dependencies probably needs the Xcode CLT on MacOS, so, I guess we put it near the beginning of
install.sh
? Here is a function to detect if CLT are missing:Works safely on other systems.
Here is the clever magic that homebrew does to get CLT installed and the EULA signed: (from https://github.com/Homebrew/install/blob/master/install#L259-L285)
My ruby, while poor, is good enough to translate that to bash, I believe... or come up with our own version.
The text was updated successfully, but these errors were encountered: