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
f32251d4
Commit
f32251d4
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
extend/fileutils: assume Ruby 2.
parent
7dddc4df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/extend/fileutils.rb
+0
-59
0 additions, 59 deletions
Library/Homebrew/extend/fileutils.rb
with
0 additions
and
59 deletions
Library/Homebrew/extend/fileutils.rb
+
0
−
59
View file @
f32251d4
...
...
@@ -98,54 +98,6 @@ module FileUtils
end
module_function
:mkdir
# The #copy_metadata method in all current versions of Ruby has a
# bad bug which causes copying symlinks across filesystems to fail;
# see #14710.
# This was resolved in Ruby HEAD after the release of 1.9.3p194, but
# never backported into the 1.9.3 branch. Fixed in 2.0.0.
# The monkey-patched method here is copied directly from upstream fix.
if
RUBY_VERSION
<
"2.0.0"
# @private
class
Entry_
alias_method
:old_copy_metadata
,
:copy_metadata
def
copy_metadata
(
path
)
st
=
lstat
unless
st
.
symlink?
File
.
utime
st
.
atime
,
st
.
mtime
,
path
end
begin
if
st
.
symlink?
begin
File
.
lchown
st
.
uid
,
st
.
gid
,
path
rescue
NotImplementedError
end
else
File
.
chown
st
.
uid
,
st
.
gid
,
path
end
rescue
Errno
::
EPERM
# clear setuid/setgid
if
st
.
symlink?
begin
File
.
lchmod
st
.
mode
&
01777
,
path
rescue
NotImplementedError
end
else
File
.
chmod
st
.
mode
&
01777
,
path
end
else
if
st
.
symlink?
begin
File
.
lchmod
st
.
mode
,
path
rescue
NotImplementedError
end
else
File
.
chmod
st
.
mode
,
path
end
end
end
end
end
# Run `scons` using a Homebrew-installed version rather than whatever is in the `PATH`.
def
scons
(
*
args
)
system
Formulary
.
factory
(
"scons"
).
opt_bin
/
"scons"
,
*
args
...
...
@@ -187,14 +139,3 @@ module FileUtils
ENV
.
update
(
removed
)
end
end
# Shim File.write for Ruby 1.8.7, where it's absent
unless
File
.
respond_to?
(
:write
)
class
File
def
self
.
write
(
filename
,
contents
)
File
.
open
(
filename
,
"w"
)
do
|
file
|
file
.
write
contents
end
end
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