sensu-plugins/sensu-plugins-postgres

Unable to modify frozen string

phumpal opened this issue · 0 comments

After upgrading to sensu-plugins-postgres v4.0.1 some checks with custom parameters fail w/

Check failed to run: can't modify frozen String, ["/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:315:in build_option_arguments'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:269:in block (2 levels) in opt_parser'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:in each'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:in block in opt_parser'", "/opt/sensu/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/optparse.rb:1062:in initialize'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:in new'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:in opt_parser'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:230:in parse_options'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:16:in initialize'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:in new'", "/opt/sensu/.rvm/gems/ruby-2.4.1/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:in `block in class:CLI'"]

Setting

# frozen_string_literal: false

allows the check to complete successfully.