From 996dcdee2cacdfee90602387d5c5142d749f00de Mon Sep 17 00:00:00 2001 From: William Roe Date: Mon, 27 Mar 2017 11:41:08 +0100 Subject: Add pinned version to outdated json output The structure should be consistent, so there are always pinned and pinned_version fields even if there are no pinned versions for a given formula. --- Library/Homebrew/cmd/outdated.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index a576162a0..e94002989 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -88,7 +88,9 @@ module Homebrew json << { name: f.full_name, installed_versions: outdated_versions.collect(&:to_s), - current_version: current_version } + current_version: current_version, + pinned: f.pinned?, + pinned_version: f.pinned_version } end puts JSON.generate(json) -- cgit v1.2.3