C
Charles Comstock
I was curious why the code in installer.rb in ruby gems was setup like this?
I thought mkdir_p checks to make sure of the existance of a dir before
creating it, and quietly fails if it already exists, making the
additional check seem odd. Is there a particular reason for this?
unless File.exist? File.join(install_dir, "specifications")
FileUtils.mkdir_p File.join(install_dir, "specifications")
end
unless File.exist? File.join(install_dir, "cache")
FileUtils.mkdir_p File.join(install_dir, "cache")
end
Also, I wasn't quite sure on this, is require_gem supposed to
automatically get a package if it's not local the first time it runs or no?
Charles Comstock
I thought mkdir_p checks to make sure of the existance of a dir before
creating it, and quietly fails if it already exists, making the
additional check seem odd. Is there a particular reason for this?
unless File.exist? File.join(install_dir, "specifications")
FileUtils.mkdir_p File.join(install_dir, "specifications")
end
unless File.exist? File.join(install_dir, "cache")
FileUtils.mkdir_p File.join(install_dir, "cache")
end
Also, I wasn't quite sure on this, is require_gem supposed to
automatically get a package if it's not local the first time it runs or no?
Charles Comstock