Skip to content

Instantly share code, notes, and snippets.

@iMichka
Created February 6, 2024 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMichka/6ebe5c7fc94d630551cf355361b8826e to your computer and use it in GitHub Desktop.
Save iMichka/6ebe5c7fc94d630551cf355361b8826e to your computer and use it in GitHub Desktop.
Fast
# typed: true
# frozen_string_literal: true
require "system_command"
module Homebrew
#. module_function
sig { returns(CLI::Parser) }
def self.fast_install_args
Homebrew::CLI::Parser.new do
description <<~EOS
Fast Install version
EOS
named_args [:formula], min: 1, max: 1
end
end
sig { void }
def self.fast_install
args = fast_install_args.parse
name = args.named[0]
p_threads = Formula[name].deps.each.map do |dep|
puts "Install #{dep}"
Process.detach(Process.spawn("#{HOMEBREW_PREFIX}/bin/brew install #{dep}"))
end
p_threads.each(&:join)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment