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
GitLab community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
b54c3d61
Commit
b54c3d61
authored
Feb 4, 2017
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Add `user_tilde` method to shorten/anonymize output.
parent
f0337a31
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+7
-2
7 additions, 2 deletions
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
with
7 additions
and
2 deletions
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+
7
−
2
View file @
b54c3d61
...
...
@@ -65,10 +65,14 @@ module Hbc
def
self
.
render_env_var
(
var
)
if
ENV
.
key?
(
var
)
var
=
%Q(
#{
var
}
="
#{
ENV
[
var
]
}
")
puts
var
.
gsub
(
ENV
[
"HOME"
],
"~"
)
puts
user_tilde
(
var
)
end
end
def
self
.
user_tilde
(
path
)
path
.
gsub
(
ENV
[
"HOME"
],
"~"
)
end
# This could be done by calling into Homebrew, but the situation
# where "doctor" is needed is precisely the situation where such
# things are less dependable.
...
...
@@ -84,7 +88,7 @@ module Hbc
end
def
self
.
render_staging_location
(
path
)
path
=
Pathname
.
new
(
path
)
path
=
Pathname
.
new
(
user_tilde
(
path
.
to_s
)
)
if
!
path
.
exist?
"
#{
path
}
#{
error_string
"error: path does not exist"
}
}"
elsif
!
path
.
writable?
...
...
@@ -95,6 +99,7 @@ module Hbc
end
def
self
.
render_load_path
(
paths
)
paths
.
map
(
&
method
(
:user_tilde
))
return
"
#{
none_string
}
#{
error_string
}
"
if
[
*
paths
].
empty?
paths
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