Actions
Bug #14436
closedHammer should provide more informative message for config file syntax errors
Difficulty:
easy
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Description
When one of yaml config files has wrong syntax (for example tab instead of space indentation) hammer fails without telling the user what actually happened and which file the issue is in:
/home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 2 column 1 (Psych::SyntaxError) from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse_stream' from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:318:in `parse' from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:245:in `load' from /home/vagrant/hammer/hammer-cli/lib/hammer_cli/settings.rb:37:in `load_from_file' from /home/vagrant/hammer/hammer-cli/lib/hammer_cli/settings.rb:20:in `block in load_from_paths' from /home/vagrant/hammer/hammer-cli/lib/hammer_cli/settings.rb:16:in `each' from /home/vagrant/hammer/hammer-cli/lib/hammer_cli/settings.rb:16:in `load_from_paths' from ./bin/hammer:49:in `<main>'
Hammer should print more informative message, for example:
Couldn't load configuration file '/home/vagrant/.hammer/cli_config.yml', please check the file syntax.
Actions