Chore: fix scripts

This commit is contained in:
Pieter Vander Vennet 2024-05-02 15:43:17 +02:00
parent f76e2b4c88
commit 285ec2b256
6 changed files with 155 additions and 128 deletions

View file

@ -224,10 +224,12 @@ export default class ScriptUtils {
})
const timeoutPromise = new Promise<any>((resolve, reject) => {
setTimeout(
() =>
timeoutSecs === undefined
? reject(new Error("Timout reached"))
: resolve("timeout"),
() => {
if(timeoutSecs === undefined){
return // No resolve
}
resolve("timeout")
},
(timeoutSecs ?? 10) * 1000
)
})