sindresorhus / open

Open stuff like URLs, files, executables. Cross-platform.
MIT License
3.18k stars 219 forks source link

``wait: true`` doesn't work using Firefox #320

Open Noxde opened 1 year ago

Noxde commented 1 year ago

When trying to open a link having Firefox as the default browser, the "wait" option won't work and any code after will run anyway. I'm using Linux btw

import open, { openApp } from "open";

// This fails to wait till firefox closes
await openApp("firefox", { wait: true });
console.log("Firefox quit");

// This waits till chrome closes
await openApp("google-chrome-stable", { wait: true });
console.log("Chrome quit");

// This fails to wait having firefox as the default browser
await open("https://google.com", { wait: true });
console.log("Google closed");

Firefox will open but the code below "await open" will run anyways