summaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-22 13:39:05 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-22 13:39:05 +0100
commit65eb3dc846c8f007e847e1d28ffabfe2028371cc (patch)
treea90441dec484b3f2a9a52844b3f748a9e2b6dfec /import
parent0ee1b57965ceeb94a47fcb6898acb96ce91e3cf9 (diff)
downloadmorph-65eb3dc846c8f007e847e1d28ffabfe2028371cc.tar.gz
Fix rubygem.to_chunk when run with no MORPH_LOG_FD set
Diffstat (limited to 'import')
-rwxr-xr-ximport/rubygems.to_chunk4
1 files changed, 2 insertions, 2 deletions
diff --git a/import/rubygems.to_chunk b/import/rubygems.to_chunk
index 578ab7bd..5f2a3c86 100755
--- a/import/rubygems.to_chunk
+++ b/import/rubygems.to_chunk
@@ -27,9 +27,9 @@ require 'yaml'
# recommended here:
# <https://stackoverflow.com/questions/1681745/share-global-logger-among-module-classes>
#
-log_fd = Integer(ENV['MORPH_LOG_FD'])
+log_fd = ENV['MORPH_LOG_FD']
if log_fd
- log_stream = IO.new(log_fd, 'w')
+ log_stream = IO.new(Integer(log_fd), 'w')
Log = Logger.new(log_stream)
Log.level = Logger::DEBUG
Log.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" }