lib/checkcheckit/console.rb in checkcheckit-0.2.1 vs lib/checkcheckit/console.rb in checkcheckit-0.3.0

- old
+ new

@@ -43,10 +43,21 @@ unless target puts "No list given.\n\n" list(args) return end - list_name = Dir[dir + '/*/*'].find{ |fname| fname.include? target } + + expanded_target = File.expand_path(target) + list_name = nil + + # see if its a Path + if File.exists?(expanded_target) + list_name = expanded_target + else + #finding the list + list_name = Dir[dir + '/*/*'].find{ |fname| fname.include? target } + end + if list_name list = List.new(list_name) if (emails = @options['email']) || @options['live'] @list_id = list_id = notify_server_of_start(emails, list) $stderr.puts web_service_url, list_id if debug?