mwean/mac_setup

View on GitHub
lib/mac_setup/command_line_tools_installer.rb

Summary

Maintainability
A
0 mins
Test Coverage
require_relative "shell"

module MacSetup
  class CommandLineToolsInstaller
    BIN_PATH = "/Library/Developer/CommandLineTools/usr/bin/clang".freeze

    def self.run
      if File.exist?(BIN_PATH)
        puts "Command Line Tools already installed. Skipping..."
      else
        Shell.run("xcode-select --install")
      end
    end
  end
end