Closed Doltair closed 6 years ago
That rule on triggers if you are using x
string literals (include backticks) or the Ruby system
function. You shouldn't use that anyway, use the shell_out()
helper method.
Thanks! @coderanger. Anyhow i have retained using Mixlib::ShellOut.new
Mixlib::ShellOut.new("/usr/bin/echo \"ActiveRecord::Base.logger.level = :error;
~> code snipped
and added escape sequences then removed backticks(replaced back ""). I've tried however using shell_out() but it throws me a readline require error (in a weird way) so i went back to Mixlib::ShellOut.new and it executes the cmd fine.
Overall the foodcritic stops whining and passed the tests.
My code block:
Then foodcritic stops whining when change to
Mixlib::Shellout:
but my code converge will fail.Help.. Thank you