From 1887b19329e7a27938702c305441fdd0675c342d Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Thu, 26 Nov 2020 17:02:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP:=20Get=20JSON=20about=20curr?= =?UTF-8?q?ent=20PHP=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Classes/Commands/Startup.swift | 3 +++ phpmon/Singletons/App.swift | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/phpmon/Classes/Commands/Startup.swift b/phpmon/Classes/Commands/Startup.swift index fa8e3d5..63a3434 100644 --- a/phpmon/Classes/Commands/Startup.swift +++ b/phpmon/Classes/Commands/Startup.swift @@ -71,6 +71,9 @@ class Startup { breaking: false ) + let brewPhpAlias = Shell.user.pipe("brew info php --json"); + print(brewPhpAlias) + if (!self.failed) { success() } diff --git a/phpmon/Singletons/App.swift b/phpmon/Singletons/App.swift index ad179e5..a69fcc0 100644 --- a/phpmon/Singletons/App.swift +++ b/phpmon/Singletons/App.swift @@ -32,4 +32,12 @@ class App { */ var timer: Timer? + /** + The version that the `php` formula via Brew is aliased to on the current system. + + If you're up to date, `php` will be aliased to the latest version, + but that might not be the case. + */ + var brewPhpAlias: String? = nil + }