lib/fig/environment.rb in fig-0.1.25 vs lib/fig/environment.rb in fig-0.1.26
- old
+ new
@@ -26,11 +26,11 @@
end
def register_package(package)
name = package.package_name
if @packages[name]
- puts "Package already exists with name: #{name}"
+ $stderr.puts "Package already exists with name: #{name}"
exit 10
end
@packages[name] = package
end
@@ -127,11 +127,11 @@
package = @packages[package_name]
if package.nil?
package = @repository.load_package(package_name, version_name || DEFAULT_VERSION_NAME)
@packages[package_name] = package
elsif version_name && version_name != package.version_name
- puts "Version mismatch: #{package_name}"
+ $stderr.puts "Version mismatch: #{package_name}"
exit 10
end
package
end
@@ -159,10 +159,10 @@
def expand_arg(arg)
arg.gsub(/\@([a-zA-Z0-9\-\.]+)/) do |match|
package = @packages[$1]
if package.nil?
- puts "Package not found: #{$1}"
+ $stderr.puts "Package not found: #{$1}"
exit 10
end
package.directory
end
end