lib/contentful/importer/command.rb in contentful-importer-0.2.1 vs lib/contentful/importer/command.rb in contentful-importer-0.2.2
- old
+ new
@@ -65,10 +65,10 @@
@settings.merge!(YAML.load_file(settings_file)) if settings_file
# CLI options can override settings of the same name
self.class.options.map { |opt| opt.first.split('=').first.split('-').last }.each do |opt|
arg = args.option(opt)
- arg = arg.to_i if opt == 'threads'
+ arg &&= arg.to_i if opt == 'threads'
@settings[opt] = arg if arg
end
@settings = @settings.with_indifferent_access
@settings[:threads] = 1 if @settings[:threads].nil?