diff options
| author | Jack Nagel | 2014-06-21 18:19:36 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-21 18:32:38 -0500 |
| commit | 3ebbbd5375375e50c6e037b92b929aa053fd7e89 (patch) | |
| tree | 2706fce8e8937518c78af579007e0af3f9dd2740 /Library | |
| parent | 8dfa4d6dde22f923971a4aa610a35cf2e8bfc910 (diff) | |
| download | homebrew-3ebbbd5375375e50c6e037b92b929aa053fd7e89.tar.bz2 | |
Remove FormulaPin dependency on FileUtils
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_pin.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_pin.rb b/Library/Homebrew/formula_pin.rb index 42a644afa..d7a8d8637 100644 --- a/Library/Homebrew/formula_pin.rb +++ b/Library/Homebrew/formula_pin.rb @@ -1,5 +1,3 @@ -require 'fileutils' - class FormulaPin PINDIR = Pathname.new("#{HOMEBREW_LIBRARY}/PinnedKegs") @@ -12,9 +10,9 @@ class FormulaPin end def pin_at(version) - PINDIR.mkpath unless PINDIR.exist? + PINDIR.mkpath version_path = @f.rack.join(version) - FileUtils.ln_s(version_path, path) unless pinned? or not version_path.exist? + path.make_relative_symlink(version_path) unless pinned? || !version_path.exist? end def pin @@ -24,7 +22,7 @@ class FormulaPin end def unpin - FileUtils.rm(path) if pinned? + path.unlink if pinned? end def pinned? |
