]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/git.rb
Fix more rubocop detected style issues
[chef.git] / cookbooks / chef / libraries / git.rb
index a5aa58c96a5ecac93856818341e38759a1713d1e..775c2da1ab080976597e78a2d1e2561692e92cd7 100644 (file)
@@ -6,7 +6,7 @@ class Chef
         command = git('ls-remote', @new_resource.repository, @new_resource.revision, "#{@new_resource.revision}^{}")
         @resolved_reference = shell_out!(command, run_options).stdout.split("\n").last
         if  @resolved_reference =~ /^([0-9a-f]{40})\s+(\S+)/
-          $1
+          Regexp.last_match[1]
         else
           nil
         end