]> gitweb.fluxo.info Git - puppet-sshkeys_core.git/commitdiff
Remove Rubocop Lint/AssignmentInCondition violation
authorJacob Helwig <jacob@technosorcery.net>
Mon, 25 Jun 2018 18:16:23 +0000 (11:16 -0700)
committerJacob Helwig <jacob@technosorcery.net>
Mon, 25 Jun 2018 18:26:53 +0000 (11:26 -0700)
lib/puppet/type/ssh_authorized_key.rb

index 6b59078296748a7a445abd6f21ce0a2288dc8a38..5c4df53c3d75179e684e5425326b0d122215c932 100644 (file)
@@ -90,10 +90,10 @@ module Puppet
       def should
         return super if defined?(@should) && @should[0] != :absent
 
-        return nil unless user = resource[:user]
+        return nil unless resource[:user]
 
         begin
-          return File.expand_path("~#{user}/.ssh/authorized_keys")
+          return File.expand_path("~#{resource[:user]}/.ssh/authorized_keys")
         rescue
           Puppet.debug 'The required user is not yet present on the system'
           return nil