From 4e817eaa6c46694ba4868a559f92aa064ef177af Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 21 Jun 2014 18:19:36 -0500 Subject: Remove FormulaPin dependency on FileUtils --- Library/Homebrew/formula_pin.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Library') 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? -- cgit v1.2.3