Skip to content

Commit 3758861

Browse files
committed
Use Data.isEmpty
1 parent 557cfcb commit 3758861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Task.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ extension Task {
512512
lifetime += stdoutAggregated
513513
.then(stderrAggregated)
514514
.flatMap(.concat) { data -> SignalProducer<TaskEvent<Data>, TaskError> in
515-
let errorString = (data.count > 0 ? String(data: data, encoding: .utf8) : nil)
515+
let errorString = (data.isEmpty ? nil : String(data: data, encoding: .utf8))
516516
return SignalProducer(error: .shellTaskFailed(self, exitCode: terminationStatus, standardError: errorString))
517517
}
518518
.start(observer)

0 commit comments

Comments
 (0)