Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
64a0e9a7
Commit
64a0e9a7
authored
4 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Add type signatures for `Caskroom`.
parent
181baaaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/.rubocop.yml
+1
-0
1 addition, 0 deletions
Library/.rubocop.yml
Library/Homebrew/cask/caskroom.rb
+7
-7
7 additions, 7 deletions
Library/Homebrew/cask/caskroom.rb
Library/Homebrew/sorbet/rbi/upstream.rbi
+7
-0
7 additions, 0 deletions
Library/Homebrew/sorbet/rbi/upstream.rbi
with
15 additions
and
7 deletions
Library/.rubocop.yml
+
1
−
0
View file @
64a0e9a7
...
...
@@ -18,6 +18,7 @@ AllCops:
-
'
Homebrew/sorbet/rbi/gems/**/*.rbi'
-
'
Homebrew/sorbet/rbi/hidden-definitions/**/*.rbi'
-
'
Homebrew/sorbet/rbi/todo.rbi'
-
'
Homebrew/sorbet/rbi/upstream.rbi'
-
'
Homebrew/bin/*'
-
'
Homebrew/vendor/**/*'
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cask/caskroom.rb
+
7
−
7
View file @
64a0e9a7
# typed:
fals
e
# typed:
tru
e
# frozen_string_literal: true
require
"utils/user"
...
...
@@ -10,13 +10,13 @@ module Cask
module
Caskroom
extend
T
::
Sig
module_function
def
path
sig
{
returns
(
Pathname
)
}
def
self
.
path
@path
||=
HOMEBREW_PREFIX
.
join
(
"Caskroom"
)
end
def
ensure_caskroom_exists
sig
{
void
}
def
self
.
ensure_caskroom_exists
return
if
path
.
exist?
sudo
=
!
path
.
parent
.
writable?
...
...
@@ -32,8 +32,8 @@ module Cask
SystemCommand
.
run
(
"/usr/bin/chgrp"
,
args:
[
"admin"
,
path
],
sudo:
sudo
)
end
sig
{
params
(
config:
Config
).
returns
(
T
::
Array
[
Cask
])
}
def
casks
(
config:
nil
)
sig
{
params
(
config:
T
.
nilable
(
Config
)
)
.
returns
(
T
::
Array
[
Cask
])
}
def
self
.
casks
(
config:
nil
)
return
[]
unless
path
.
exist?
Pathname
.
glob
(
path
.
join
(
"*"
)).
sort
.
select
(
&
:directory?
).
map
do
|
path
|
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/sorbet/rbi/upstream.rbi
0 → 100644
+
7
−
0
View file @
64a0e9a7
# typed: strict
class Pathname
# https://github.com/sorbet/sorbet/pull/3676
sig { params(p1: T.any(String, Pathname), p2: String).returns(T::Array[Pathname]) }
def self.glob(p1, p2 = T.unsafe(nil)); end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment