# File lib/chef/provider/package/macports.rb, line 23 def current_installed_version command = "port installed #{@new_resource.package_name}" output = get_response_from_command(command) response = nil output.each_line do |line| match = line.match(/^.+ @([^\s]+) \(active\)$/) response = match[1] if match end response end