Skip to content

Commit

Permalink
Merged by Peril
Browse files Browse the repository at this point in the history
Read standard error when the shell executor fails
  • Loading branch information
peril-staging[bot] committed Oct 23, 2019
2 parents c5c8473 + 86b9703 commit 87f0c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

## Master

- Add --version support [@f-meloni][] - [#278](https://github.com/danger/swift/pull/287)
- Read standard error when the shell executor fails [@f-meloni][] - [#288](https://github.com/danger/swift/pull/288)
- Add --version support [@f-meloni][] - [#287](https://github.com/danger/swift/pull/287)

## 2.0.6

Expand Down
2 changes: 1 addition & 1 deletion Sources/DangerShellExecutor/ShellExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public struct ShellExecutor: ShellExecuting {
}

// OK, so it failed, raise a new error with all the useful metadata
let stderrData = stdout.fileHandleForReading.readDataToEndOfFile()
let stderrData = stderr.fileHandleForReading.readDataToEndOfFile()
let stderrString = String(data: stderrData, encoding: .utf8)!

throw SpawnError.commandFailed(command: command,
Expand Down

0 comments on commit 87f0c8b

Please sign in to comment.