Skip to content

Commit

Permalink
Add error output to exec error messages
Browse files Browse the repository at this point in the history
e.g. for an error like "env: ‘node’: No such file or directory"
the sublime console was only reporting "exited with code 127"
which wasn't very helpful in determining the cause.
  • Loading branch information
Kelly Campbell committed Sep 11, 2017
1 parent a4b5c65 commit fc472d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flowtype/commands/exec_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ def run(self):

os.close(read)
except subprocess.CalledProcessError as err:
self.stderr = str(err)
if type(err.output) is bytes:
output = err.output.decode('utf-8')
else:
output = err.output
self.stderr = str(err) + ': ' + str(output)
self.returncode = 1

0 comments on commit fc472d0

Please sign in to comment.