Skip to content

Commit

Permalink
Only pass level and config args to breaktime dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
joonty committed May 3, 2013
1 parent 0b80052 commit a039a49
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/breaktime/schedule.rb
Expand Up @@ -72,12 +72,8 @@ def run_dialog
#
# The exit code is returned.
def exec_self(mode, args = {})
arg_str = ''
@cli_options.merge(args).each do |n,v|
if v && !n.to_s.include?("_given")
arg_str += " --#{n} #{v}"
end
end
opts = @cli_options.merge(args)
arg_str = "--config #{opts[:config]} --level #{opts[:level]}"
exec_str = "#{$PROGRAM_NAME} #{mode} #{arg_str}"
@log.debug { "Executing `#{exec_str}`" }
system exec_str
Expand Down

0 comments on commit a039a49

Please sign in to comment.