alfy
alfy copied to clipboard
Alfy eats errors from Run Script action
Alfred's workflow debugger only shows output from stderr. These lines redirect all output from stderr to alfy.error(), which then uses console.log() to print it to stdout:
loudRejection(alfy.error);
process.on('uncaughtException', alfy.error);
hookStd.stderr(alfy.error);
This means that any errors that occur inside a Run Script action are never displayed in the workflow debugger.
IssueHunt Summary
Backers (Total: $20.00)
issuehunt ($20.00)
Submitted pull Requests
Become a backer now!
Or submit a pull request to get the deposits!
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Yes, we show the error in the Alfy itself instead:
https://github.com/sindresorhus/alfy/blob/0dafe8f4f1b8e9b95b4d017a47dfe7d1553b0dbe/index.js#L70-L96
But you're right, we should also enable stderr to go through so it's also shown in the debugger.
@issuehunt has funded $20.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.
I think we don't need hook-std here. Remove the hook-std and add console.error to alfy.error will fix this issue.
If anyone wants to work on this, see the initial attempt and feedback in https://github.com/sindresorhus/alfy/pull/112.