Reputation: 43
This is an extremely weird bug I'm running into. Basically, I have this execFile
:
export const execFile = util.promisify(childProcess.execFile);
When I use this to open up a dmg file that is currently mounted, it opens up the application, but it doesn't call the .then()
portion.
I tested this in node console too, and it's the same thing:
Here's the snippet I'm running in node console:
async function openAnyDesk() {
console.log("hi");
const { stdout } = await execFile(
"/Volumes/AnyDesk/AnyDesk.app/Contents/MacOS/AnyDesk"
);
console.log("wtf?");
console.log("stdout", stdout);
}
> openAnyDesk()
hi
Promise {
<pending>,
[Symbol(async_id_symbol)]: 644,
[Symbol(trigger_async_id_symbol)]: 5,
[Symbol(destroyed)]: { destroyed: false }
}
>
Currently stumped. Any ideas?
Upvotes: 0
Views: 103
Reputation: 43
Actually, it looks like I misunderstood when the promise actually gets resolved. It'll only get resolved once the application exits, not on opening.
Found this gem: https://github.com/nodejs/node/issues/34234
Upvotes: 0