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])