We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Data.isEmpty
1 parent 557cfcb commit 3758861Copy full SHA for 3758861
Sources/Task.swift
@@ -512,7 +512,7 @@ extension Task {
512
lifetime += stdoutAggregated
513
.then(stderrAggregated)
514
.flatMap(.concat) { data -> SignalProducer<TaskEvent<Data>, TaskError> in
515
- let errorString = (data.count > 0 ? String(data: data, encoding: .utf8) : nil)
+ let errorString = (data.isEmpty ? nil : String(data: data, encoding: .utf8))
516
return SignalProducer(error: .shellTaskFailed(self, exitCode: terminationStatus, standardError: errorString))
517
}
518
.start(observer)
0 commit comments