Sha256: 1353a8f60388c4f923f0fd3e62e2f02b4be3701d972644fda26dfde7e10427ee

Contents?: true

Size: 373 Bytes

Versions: 14

Compression:

Stored size: 373 Bytes

Contents

#!/usr/bin/env ruby

require 'csv'
require 'shellwords'

begin
  CSV.open(ARGV[0], 'rb').each { }
rescue CSV::MalformedCSVError => e
  puts e.class.to_s + ': ' + e.message
  if e.message =~ /line (\d+)/
    lineno = $1.to_i
    cmd = "csv-readline #{Shellwords.escape(ARGV[0])} #{lineno}"
    puts "running #{cmd}"
    system(cmd)
  end
  exit 1
end

puts 'CSV file is ok'

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
csv-utils-0.3.5 bin/csv-find-error
csv-utils-0.3.4 bin/csv-find-error
csv-utils-0.3.3 bin/csv-find-error
csv-utils-0.3.2 bin/csv-find-error
csv-utils-0.3.1 bin/csv-find-error
csv-utils-0.3.0 bin/csv-find-error
csv-utils-0.2.3 bin/csv-find-error
csv-utils-0.2.2 bin/csv-find-error
csv-utils-0.2.1 bin/csv-find-error
csv-utils-0.2.0 bin/csv-find-error
csv-utils-0.1.7 bin/csv-find-error
csv-utils-0.1.6 bin/csv-find-error
csv-utils-0.1.5 bin/csv-find-error
csv-utils-0.1.4 bin/csv-find-error