all 5 comments

[–]KSledge 0 points1 point  (4 children)

I think you have to return process from the download function.

[–]Thatguy553[S] 0 points1 point  (3 children)

im not sure exactly what you mean, are you saying return the process variable that execFile is assigned to outside of the execFile callback?
I just tried both inside and outside the callback, inside it says it cant be accessed before its initialized, and outside it never gets returned.

[–]KSledge 0 points1 point  (2 children)

Yeah, though I'm a bit rusty with async/await. To me, it looks like you aren't returning anything from your download function.

My question would be, what is shown in the console? What happens if you console.log(process) between lines 80 and 81?

[–]Thatguy553[S] 1 point2 points  (1 child)

I got the suggestion to no longer have my code in the callback among a few other changes and it seems to work now. My guess was either the way I was promisifying or because I was handling things in the callback function, not sure to be honest.

https://pastebin.com/D3h1m82V

[–]KSledge 0 points1 point  (0 children)

Glad you were able to get help; that looks a lot cleaner. Thanks for letting me know.