Skip to content

Commit

Permalink
move output path setup up the scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorian Karter committed Apr 8, 2015
1 parent 515216d commit 0640840
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sandi_meter/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ class << self
def execute
cli = CommandParser.new
cli.parse_options

cli.config[:output_path] ||= File.expand_path(File.join(cli.config[:path], 'sandi_meter'))

if cli.config[:graph]
cli.config[:output_path] ||= File.expand_path(File.join(cli.config[:path], 'sandi_meter'))
FileUtils.mkdir_p(cli.config[:output_path]) unless Dir.exists?(cli.config[:output_path])

create_config_file(cli.config[:output_path], '.sandi_meter', %w(db vendor).join("\n"))
Expand Down

0 comments on commit 0640840

Please sign in to comment.