Skip to content

Commit

Permalink
fix hierr errors reporting in normal mode
Browse files Browse the repository at this point in the history
  • Loading branch information
seletskiy committed Jun 16, 2016
1 parent 426deda commit f97c03b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions format.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (writer *jsonOutputWriter) Write(data []byte) (int, error) {
}

func serializeError(err error) string {
if format == outputFormatText {
return fmt.Sprint(err)
}

if hierarchicalError, ok := err.(hierr.Error); ok {
serializedError := fmt.Sprint(hierarchicalError.Nested)
if nested, ok := hierarchicalError.Nested.(error); ok {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tests:not tests:ensure :orgalorg:with-key -o example.com -C pwd

tests:assert-stderr "└─ can't create runner"

0 comments on commit f97c03b

Please sign in to comment.