Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By default, print out debug information when error was encountered #282

Open
krzkaczor opened this issue Aug 13, 2024 · 2 comments
Open

Comments

@krzkaczor
Copy link

krzkaczor commented Aug 13, 2024

Simple code such:

await $`false`;

Throws totally unhelpful error message like

Uncaught Error: Exited with code: 1
    at CommandChild.pipedStdoutBuffer (file:///Users/krzkaczor/Workspace/spark/spark-alm-planner/node_modules/.pnpm/[email protected]/node_modules/dax-sh/esm/mod.js:8625:19)

(often even stack trace is not helpful).

I think the default behaviour should be to throw an error with command name that was executed and at least few final lines of stderr and stdout.

For reference, this is what bun/shell will do (output and error code both parts of the responses):
image

@dsherret
Copy link
Owner

dsherret commented Aug 13, 2024

Hey @krzkaczor, hope you're doing well!

I think this is?

#150
#172

The stack trace right now is not helpful due to a v8 bug.

@krzkaczor
Copy link
Author

Hey David, long time no talk ;)

Yeah it's definitely related to those tickets, I decided to create another ticket because I think this behaviour should be a default. Feel free to close this if you think the other tickets are enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants