aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-06-21 18:19:36 -0500
committerJack Nagel2014-06-21 18:32:38 -0500
commit4e817eaa6c46694ba4868a559f92aa064ef177af (patch)
treed3f91a057e90451c89a7861d5e14f6d4fc04c9a1
parent70d0035d372d5d602779add80ac250730c4d7749 (diff)
downloadbrew-4e817eaa6c46694ba4868a559f92aa064ef177af.tar.bz2
Remove FormulaPin dependency on FileUtils
-rw-r--r--Library/Homebrew/formula_pin.rb8
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?