diff options
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index 79a962fcb..9fb8c3878 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -5,15 +5,7 @@ module FileUtils extend self # Create a temporary directory then yield. When the block returns, # recursively delete the temporary directory. - def mktemp - # Prefer download_name if it is defined, for two reasons: - # - The name attribute may be nil for resources that represent primary - # formula downloads, in which case we want to use just the owner name. - # - For resources that have a name defined, we want to use "owner--name" - # instead of just "name" - prefix = download_name if respond_to?(:download_name) - prefix ||= name - + def mktemp(prefix=name) # I used /tmp rather than `mktemp -td` because that generates a directory # name with exotic characters like + in it, and these break badly written # scripts that don't escape strings before trying to regexp them :( |
