Fix visibility of FileUtils extension methods
This commit is contained in:
parent
9e57da83a2
commit
7f10aa3b6e
@ -1,7 +1,7 @@
|
||||
require 'fileutils'
|
||||
|
||||
# We enhance FileUtils to make our Formula code more readable.
|
||||
module FileUtils extend self
|
||||
module FileUtils
|
||||
|
||||
# Create a temporary directory then yield. When the block returns,
|
||||
# recursively delete the temporary directory.
|
||||
@ -26,15 +26,16 @@ module FileUtils extend self
|
||||
module_function :mktemp
|
||||
|
||||
# A version of mkdir that also changes to that folder in a block.
|
||||
alias mkdir_old mkdir
|
||||
alias_method :old_mkdir, :mkdir
|
||||
def mkdir name, &block
|
||||
FileUtils.mkdir(name)
|
||||
old_mkdir(name)
|
||||
if block_given?
|
||||
chdir name do
|
||||
yield
|
||||
end
|
||||
end
|
||||
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;
|
||||
@ -83,6 +84,8 @@ module FileUtils extend self
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Run scons using a Homebrew-installed version, instead of whatever
|
||||
# is in the user's PATH
|
||||
def scons *args
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user