stateful-process-command-proxy icon indicating copy to clipboard operation
stateful-process-command-proxy copied to clipboard

initCommands result validation

Open dchekanov opened this issue 4 years ago • 3 comments

Hi and thanks for open-sourcing this module!

It would be great to be able to get results of initCommands execution - to check for errors and throw if something is not right (if there's a message in stderr, for example).

dchekanov avatar Dec 30 '20 17:12 dchekanov

@dchekanov if you want to submit that in a PR I can build/tag and push it. I just don't have time to code it at the moment. Or maybe @nfedyk could do it.

bitsofinfo avatar Dec 30 '20 17:12 bitsofinfo

I was able to inject a function to validate initCommands results. However, stderr for basic bash commands like >&2 echo "error" or err is empty. The expected stderr content ("error"/"bash: err: command not found") appears in the next command result instead for some reason, and it's deeper than I'd like to go at the moment. With pwsh it seem to work fine for post-init commands, and that's enough in our case. I'll submit a PR if our requirements change and I end up patching the library.

dchekanov avatar Dec 31 '20 08:12 dchekanov

hmm odd, yeah if you have anything to add, most welcome! thanks!

bitsofinfo avatar Dec 31 '20 12:12 bitsofinfo