From 54012f14ced9eaf0997514265ca9a9dc5b7c5bea Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 3 Nov 2023 11:37:01 +0000 Subject: [PATCH] cask: add `installed_time` to JSON output. This is provided for formulae in `installed.time` and is useful to have for casks as well as formulae so let's output it here too. --- Library/Homebrew/cask/cask.rb | 1 + Library/Homebrew/test/support/fixtures/cask/everything.json | 1 + 2 files changed, 2 insertions(+) diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 6d71d30ddf..fadce179e3 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -321,6 +321,7 @@ module Cask "appcast" => appcast, "version" => version, "installed" => installed_version, + "installed_time" => install_time&.to_i, "outdated" => outdated?, "sha256" => sha256, "artifacts" => artifacts_list, diff --git a/Library/Homebrew/test/support/fixtures/cask/everything.json b/Library/Homebrew/test/support/fixtures/cask/everything.json index 32eae9e9bd..b720fd44e7 100644 --- a/Library/Homebrew/test/support/fixtures/cask/everything.json +++ b/Library/Homebrew/test/support/fixtures/cask/everything.json @@ -20,6 +20,7 @@ "appcast": null, "version": "1.2.3", "installed": null, + "installed_time": null, "outdated": false, "sha256": "c64c05bdc0be845505d6e55e69e696a7f50d40846e76155f0c85d5ff5e7bbb84", "artifacts": [