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.
1 parent 44a0f9b commit 0564ec8Copy full SHA for 0564ec8
Sources/DangerShellExecutor/ShellExecutor.swift
@@ -77,8 +77,8 @@ public struct ShellExecutor: ShellExecuting {
77
78
task.waitUntilExit()
79
80
- let result = String(data: data, encoding: .utf8) ?? ""
81
- return result.trimmingCharacters(in: .whitespacesAndNewlines)
+ let result = String(data: data, encoding: .utf8).map { $0.trimmingCharacters(in: .whitespacesAndNewlines) } ?? ""
+ return result
82
} catch {
83
return error.localizedDescription
84
}
0 commit comments