sh19910711 / git-contest

Git extension for the online judges
https://rubygems.org/gems/git-contest
MIT License
11 stars 5 forks source link

Error on `git contest config site add {site-name}` #40

Closed sh19910711 closed 9 years ago

sh19910711 commented 9 years ago

Summary

Forgot to initialize config["sites"] as Hash on get_config().

Output

$ git contest config site add codeforces
# input site config (password will be hidden)
/home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/lib/git/contest/command_line/sub_commands/config_command.rb:159:in `run_site_add': undefined method `[]' for false:FalseClass (NoMethodError)
    from /home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/lib/git/contest/command_line/sub_commands/config_command.rb:110:in `run_site'
    from /home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/lib/git/contest/command_line/sub_commands/config_command.rb:31:in `run'
    from /home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/lib/git/contest/command_line/main_command.rb:34:in `call_subcommand'
    from /home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/lib/git/contest/command_line/main_command.rb:21:in `run'
    from /home/contest/.gem/ruby/2.2.0/gems/git-contest-0.2.5/bin/git-contest:15:in `<top (required)>'
    from /home/contest/.gem/ruby/2.2.0/bin/git-contest:23:in `load'
    from /home/contest/.gem/ruby/2.2.0/bin/git-contest:23:in `<main>'

Links