You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As part of a Game Extension that I'm writing I need to manage a third-party tool. I'd like to do version checking of the third party tool to prompt users to download updates, so I need to execute that tool with --version and read the output to determine what the current version of the tool is. context.api.runExecutable returns Promise<void> and doesn't use the stdOut of the child process.
Describe the solution you'd like
I'd like to see runExecutable return Promise<string?> instead, where it resolves the stdOut of the child process where there is one
Describe alternatives you've considered
I've considered either making the version check itself whether it's the latest version and just exiting with a code of 1 if it's not or just spawning a child process myself in my extension. Neither seem like good solutions when there's already an api for running executables, but for the moment I'll be spawning the child process myself
The text was updated successfully, but these errors were encountered:
There's nothing wrong with it specifically, but when there's an API function that's already doing everything I need except returning output it feels like unnecessary code
I see where you're coming from. It would probably be better to make a new function rather than changing the existing because that could potentially cause issues with back-compat.
Personally I can't imagine too many uses where you'd check, or rely on, the output of a () => void function, and therefore too many cases where returning something would cause backwards incompatibility. That being said, I don't know all the cases that's why Nagev (I don't know what their handle on Github is) said to file the issue and if they has time he may get around to checking if it's a viable change
Is your feature request related to a problem? Please describe.
As part of a Game Extension that I'm writing I need to manage a third-party tool. I'd like to do version checking of the third party tool to prompt users to download updates, so I need to execute that tool with
--version
and read the output to determine what the current version of the tool is.context.api.runExecutable
returnsPromise<void>
and doesn't use thestdOut
of the child process.Describe the solution you'd like
I'd like to see
runExecutable
returnPromise<string?>
instead, where it resolves thestdOut
of the child process where there is oneDescribe alternatives you've considered
I've considered either making the version check itself whether it's the latest version and just exiting with a code of 1 if it's not or just spawning a child process myself in my extension. Neither seem like good solutions when there's already an api for running executables, but for the moment I'll be spawning the child process myself
The text was updated successfully, but these errors were encountered: