From d1498eb07079fef97ba14eb54f1e8986e5d10f35 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 3 Mar 2023 14:44:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20issue=20with=20parsing=20C?= =?UTF-8?q?askFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/Integrations/Homebrew/CaskFile.swift | 2 +- tests/unit/Test Files/brew/phpmon-dev.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpmon/Domain/Integrations/Homebrew/CaskFile.swift b/phpmon/Domain/Integrations/Homebrew/CaskFile.swift index a929b36..2fb9470 100644 --- a/phpmon/Domain/Integrations/Homebrew/CaskFile.swift +++ b/phpmon/Domain/Integrations/Homebrew/CaskFile.swift @@ -39,10 +39,10 @@ struct CaskFile { } let lines = string.split(separator: "\n") - .filter { $0 != "" } .map { line in return line.trimmingCharacters(in: .whitespacesAndNewlines) } + .filter { $0 != "" } if lines.count < 4 { Log.err("The CaskFile is <4 lines long, which is too short") diff --git a/tests/unit/Test Files/brew/phpmon-dev.rb b/tests/unit/Test Files/brew/phpmon-dev.rb index 2b487c9..60badb9 100644 --- a/tests/unit/Test Files/brew/phpmon-dev.rb +++ b/tests/unit/Test Files/brew/phpmon-dev.rb @@ -11,3 +11,4 @@ cask 'phpmon-dev' do app 'PHP Monitor DEV.app', target: "PHP Monitor DEV.app" end +