From 697e16abf53072cc903714e230171303d11e6f51 Mon Sep 17 00:00:00 2001 From: imalice Date: Fri, 12 Oct 2018 10:06:27 +0700 Subject: [PATCH] removes deprecated method --- install.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.swift b/install.swift index d095874..55d8b70 100644 --- a/install.swift +++ b/install.swift @@ -52,7 +52,7 @@ func shell(launchPath: String, arguments: [String]) -> String let data = pipe.fileHandleForReading.readDataToEndOfFile() let output = String(data: data, encoding: String.Encoding.utf8)! - if output.characters.count > 0 { + if !output.isEmpty { //remove newline character. let lastIndex = output.index(before: output.endIndex) return String(output[output.startIndex ..< lastIndex])