bundle/commands/install: typed: strict

This commit is contained in:
Ruoyu Zhong 2025-08-21 22:33:29 +08:00
parent e910f91124
commit 12366f9c5b
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
# typed: true # rubocop:todo Sorbet/StrictSigil # typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "bundle/brewfile" require "bundle/brewfile"
@ -8,6 +8,17 @@ module Homebrew
module Bundle module Bundle
module Commands module Commands
module Install module Install
sig {
params(
global: T::Boolean,
file: T.nilable(String),
no_lock: T::Boolean,
no_upgrade: T::Boolean,
verbose: T::Boolean,
force: T::Boolean,
quiet: T::Boolean,
).void
}
def self.run(global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false, def self.run(global: false, file: nil, no_lock: false, no_upgrade: false, verbose: false, force: false,
quiet: false) quiet: false)
@dsl = Brewfile.read(global:, file:) @dsl = Brewfile.read(global:, file:)
@ -17,7 +28,9 @@ module Homebrew
) || exit(1) ) || exit(1)
end end
sig { returns(T.nilable(Dsl)) }
def self.dsl def self.dsl
@dsl ||= T.let(nil, T.nilable(Dsl))
@dsl @dsl
end end
end end