Skip to content

Commit

Permalink
Do not interpolate string
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Charreau committed Dec 20, 2023
1 parent 7b21f30 commit 6daac95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/elastic_stack_keystore/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def self.run_keystore(args, service, stdin = nil)
if has_passwd?(service)

Check failure on line 95 in lib/puppet/provider/elastic_stack_keystore/ruby.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/SoleNestedConditional: Consider merging nested conditions into outer `unless` conditions.
unless password.strip.empty?

Check failure on line 96 in lib/puppet/provider/elastic_stack_keystore/ruby.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Metrics/BlockNesting: Avoid more than 3 levels of block nesting. (https://rubystyle.guide#three-is-the-number-thou-shalt-count)

Check failure on line 96 in lib/puppet/provider/elastic_stack_keystore/ruby.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/SoleNestedConditional: Consider merging nested conditions into outer `if` conditions.
if stdin.nil?

Check failure on line 97 in lib/puppet/provider/elastic_stack_keystore/ruby.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.
stdin = "#{password}"
stdin = password
else
stdin = "#{password}\n#{stdin}"
end
Expand Down

0 comments on commit 6daac95

Please sign in to comment.