add return type

This commit is contained in:
Mylloon 2023-08-04 19:32:45 +02:00
parent 823618535f
commit 3875d3cefe
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -24,7 +24,9 @@ export const printAndDevTool = (win: BrowserWindow, error: string) => {
};
/** Run a command asynchronously */
export const execute = (command: string) => {
export const execute = (
command: string
): Promise<{ stdout: string; stderr: string }> => {
return new Promise((resolve, reject) => {
child_process.exec(command, (error, stdout, stderr) => {
if (error) {