Exit with message if no filename is provided

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@540680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-05-22 18:25:45 +00:00
parent 766f825fe6
commit b99ad78761
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ solr_url = ENV["SOLR_URL"] || "http://localhost:8983/solr"
dl_filename = ARGV[0]
debug = ARGV[1] == "-debug"
if dl_filename == nil
puts "You must pass a filename as an option."
exit
end
source = Solr::Importer::DelimitedFileSource.new(dl_filename)
# Exported column names