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.
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/206 added
Updated by The Foreman Bot over 8 years ago
- Assignee set to Tomáš Strachota
- Pull request https://github.com/theforeman/hammer-cli/pull/211 added
Updated by Abhijeet Kasurde over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ebfac63d567159ec82daa7b6dbede5898715a3dc.
Updated by Tomáš Strachota over 8 years ago
- Has duplicate Bug #12115: badly formatted yaml prevents hammer from running added
Actions