Skip to content

Commit 0564ec8

Browse files
committed
Fixed code review issue
1 parent 44a0f9b commit 0564ec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/DangerShellExecutor/ShellExecutor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public struct ShellExecutor: ShellExecuting {
7777

7878
task.waitUntilExit()
7979

80-
let result = String(data: data, encoding: .utf8) ?? ""
81-
return result.trimmingCharacters(in: .whitespacesAndNewlines)
80+
let result = String(data: data, encoding: .utf8).map { $0.trimmingCharacters(in: .whitespacesAndNewlines) } ?? ""
81+
return result
8282
} catch {
8383
return error.localizedDescription
8484
}

0 commit comments

Comments
 (0)