@@ -76,6 +76,7 @@ def fetch(quiet: nil, timeout: nil)
76
76
satisfy_cask_and_formula_dependencies
77
77
end
78
78
79
+ sig { void }
79
80
def stage
80
81
odebug "Cask::Installer#stage"
81
82
@@ -88,6 +89,7 @@ def stage
88
89
raise e
89
90
end
90
91
92
+ sig { void }
91
93
def install
92
94
start_time = Time . now
93
95
odebug "Cask::Installer#install"
@@ -152,6 +154,7 @@ def check_deprecate_disable
152
154
end
153
155
end
154
156
157
+ sig { void }
155
158
def check_conflicts
156
159
return unless @cask . conflicts_with
157
160
@@ -168,6 +171,7 @@ def check_conflicts
168
171
end
169
172
end
170
173
174
+ sig { void }
171
175
def uninstall_existing_cask
172
176
return unless @cask . installed?
173
177
@@ -196,6 +200,7 @@ def download(quiet: nil, timeout: nil)
196
200
timeout :)
197
201
end
198
202
203
+ sig { void }
199
204
def verify_has_sha
200
205
odebug "Checking cask has checksum"
201
206
return if @cask . sha256 != :no_check
@@ -213,6 +218,12 @@ def primary_container
213
218
end
214
219
end
215
220
221
+ sig { returns ( ArtifactSet ) }
222
+ def artifacts
223
+ @cask . artifacts
224
+ end
225
+
226
+ sig { params ( to : Pathname ) . void }
216
227
def extract_primary_container ( to : @cask . staged_path )
217
228
odebug "Extracting primary container"
218
229
@@ -242,7 +253,6 @@ def extract_primary_container(to: @cask.staged_path)
242
253
243
254
sig { params ( predecessor : T . nilable ( Cask ) ) . void }
244
255
def install_artifacts ( predecessor : nil )
245
- artifacts = @cask . artifacts
246
256
already_installed_artifacts = [ ]
247
257
248
258
odebug "Installing artifacts"
@@ -301,6 +311,7 @@ def check_macos_requirements
301
311
raise CaskError , @cask . depends_on . macos . message ( type : :cask )
302
312
end
303
313
314
+ sig { void }
304
315
def check_arch_requirements
305
316
return if @cask . depends_on . arch . nil?
306
317
@@ -316,6 +327,7 @@ def check_arch_requirements
316
327
"but you are running #{ @current_arch } ."
317
328
end
318
329
330
+ sig { returns ( T ::Array [ T . untyped ] ) }
319
331
def cask_and_formula_dependencies
320
332
return @cask_and_formula_dependencies if @cask_and_formula_dependencies
321
333
@@ -489,8 +501,6 @@ def finalize_upgrade
489
501
490
502
sig { params ( clear : T ::Boolean , successor : T . nilable ( Cask ) ) . void }
491
503
def uninstall_artifacts ( clear : false , successor : nil )
492
- artifacts = @cask . artifacts
493
-
494
504
odebug "Uninstalling artifacts"
495
505
odebug "#{ ::Utils . pluralize ( "artifact" , artifacts . length , include_count : true ) } defined" , artifacts
496
506
0 commit comments