Skip to content

Commit

Permalink
Restores friendly command line interface errors
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingrobots committed Oct 6, 2013
1 parent d7aef77 commit 8202f62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def parseArgs args
end

args = args.split(' ') if args.class == String
@cli = p.parse(args)

@cli = Trollop::with_standard_exception_handling p do
p.parse(args)
end

@cli[:in] = @cli[:in].flatten().select() { |f| File.directory?(f) }
Trollop::die "No input paths were specified or valid." if @cli[:in].empty?
Expand Down

0 comments on commit 8202f62

Please sign in to comment.