Skip to content

Commit

Permalink
bot: Use Shellwords.split to handle --opt="a b". #139.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahwhy committed Aug 15, 2015
1 parent 4d463a4 commit 8cb8258
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/job_options_parser.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'shellwords'
require 'trollop'

class JobOptionsParser
Expand All @@ -20,7 +21,7 @@ def initialize

def parse(str)
begin
@parser.parse((str || '').split(/\s+/)).tap do |h|
@parser.parse(Shellwords.split(str || '')).tap do |h|
if h[:ignore_sets]
h[:ignore_sets] = h[:ignore_sets].split(',')
end
Expand Down

0 comments on commit 8cb8258

Please sign in to comment.