Olipro / Project-Illuminati

Welcome to the New World Order
http://olipro.github.io/Project-Illuminati/
GNU Affero General Public License v3.0
12 stars 3 forks source link

an illegal root section name crashes the software #1

Open lelutin opened 7 years ago

lelutin commented 7 years ago

Hello, when trying out this software I made the simple mistake of spelling the root section name wrong. Instead of saying that the section name does not exist, the software just crashed like so:

vagrant@jessie:~/Project-Illuminati$ bundle exec ruby nwo.rb -f p2.yml -n koumbitswitches
/home/vagrant/Project-Illuminati/lib/illuminati/p2.rb:5:in `initialize': undefined method `[]' for nil:NilClass (NoMethodError)
    from nwo.rb:15:in `new'
    from nwo.rb:15:in `<main>'

it'd be nice to check that the root section name exists before calling initialize and if it doesn't exist tell something like this to the user: "error: root section name %s does not exist"