Behaviour of util.promisify(childProcess.exec)
inconsistent with node
#13458
Labels
2-0-x
3-0-x
app-feedback-program
bug 🪲
component/node-integration
platform/all
status/confirmed
A maintainer reproduced the bug or agreed with the feature
version/1.8.x
Projects
Expected Behavior
util.promisify(childProcess.exec)
should behave the same on electron as on nodeActual behavior
On node,
promisify
-ed versions ofchildProcess.exec
&childProcess.execFile
have custom behaviour, resolving to an object of the form{stdout, stderr}
, or rejecting with an Error with the custom propertiesstdout
&stderr
. (Reference : https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)On electron, there is no such behaviour, which leads to weird stuff.
To Reproduce
Additional Information
The node behaviour is achieved thanks to https://nodejs.org/api/util.html#util_custom_promisified_functions . On node,
childProcess.exec[util.promisify.custom]
is defined, whereas it is undefined on electron.It can also be noted that this issue has already been (poorly) reported some time ago #10925
The text was updated successfully, but these errors were encountered: