diff options
| author | Mike McQuaid | 2013-10-06 22:04:46 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-10-10 16:46:47 +0100 |
| commit | 8db4a6c18d3f69a1aa41b9db17b63ae751ef1ff8 (patch) | |
| tree | 2523a2b1a98554651f7e145ac3c4e1202eed4e62 /Library/Homebrew/extend | |
| parent | e39703be8ee4df3f55a9e583cd62439297063eed (diff) | |
| download | homebrew-8db4a6c18d3f69a1aa41b9db17b63ae751ef1ff8.tar.bz2 | |
InstallRenamed: don't overwrite etc files; rename.
If an etc file exists on installation instead of overwriting it (or
requiring all the manual checks in formula) simply copy it with the
extension `.default` appended.
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 0edd1bd06..fd5cf67f1 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -50,6 +50,8 @@ class Pathname # and also broken symlinks are not the end of the world raise "#{src} does not exist" unless File.symlink? src or File.exist? src + dst = yield(src, dst) if block_given? + mkpath if File.symlink? src # we use the BSD mv command because FileUtils copies the target and |
