Skip to content

Commit

Permalink
Fix bug with non-existent constant
Browse files Browse the repository at this point in the history
This happened due to a refactoring and moving of class constants. Only
happened when there was no default config file.
  • Loading branch information
joonty committed Feb 14, 2013
1 parent db2c403 commit ccf46b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/breaktime/main.rb
Expand Up @@ -199,10 +199,11 @@ def parse_yaml_file
@log.debug { e.message }
Trollop::die :config, "must be a valid yaml file"
end
elsif @cli.options[:config] != DEFAULT_CONFIG
elsif @cli.options[:config] != Breaktime::CLI::DEFAULT_CONFIG
Trollop::die :config, "must be a valid yaml file"
else
@log.info { "No configuration file found, using defaults" }
@log.warn { "No configuration file found at #{Breaktime::CLI::DEFAULT_CONFIG}, using defaults" }
@log.info { "Check the README for info on creating a configuration file" }
end
end
end

0 comments on commit ccf46b4

Please sign in to comment.