Skip to content

Commit

Permalink
filesystem: adds more context to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
andrestc committed Mar 29, 2018
1 parent 5d14433 commit 70d170d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main

import (
"bytes"
"fmt"
"io/ioutil"
"os"
"strings"
Expand Down Expand Up @@ -60,7 +61,7 @@ func (f *executorFS) ReadFile(name string) ([]byte, error) {
Stderr: errOut,
}
if err := f.executor.Execute(opts); err != nil {
return nil, err
return nil, fmt.Errorf("error reading file %v: %v. output: %v", name, err, errOut.String())
}
return out.Bytes(), nil
}
Expand Down

0 comments on commit 70d170d

Please sign in to comment.