Closed SnuwYx closed 3 months ago
Yes, because killing exit the execution with a no specific exitCode:
Since killing is forcing the process to finish unexpectedly, you can just catch the error:
const youtubedl = require('youtube-dl-exec')
const url = 'https://www.youtube.com/watch?v=6xKWiCMKKJg'
;(async () => {
const result = await youtubedl.exec(url, { dumpSingleJson: true }, { timeout: 500, killSignal: 'SIGKILL' }).catch(err => err)
console.log(result)
})()
I am trying to use the kill method but I am being thrown a tinyspawn error each time, is this supposed to happen?
the function i ran, i tried making as similar as the one in the doc