Raise if installing a non-existent file

This commit is contained in:
Max Howell 2009-08-21 18:26:50 +01:00
parent 9bc60b80b6
commit 65e1419ea9

View File

@ -33,7 +33,8 @@ class Pathname
def install src
if src.is_a? Array
src.collect {|src| install src }
elsif File.exist? src
else
raise "#{src} does not exist" unless File.exist? src
mkpath
if File.symlink? src
# we use the BSD mv command because FileUtils copies the target and