Enhance openBrowser function to specify Edge as the browser and enable wait option

This commit is contained in:
2026-02-03 23:56:16 +01:00
parent 2645d6c1f4
commit 1a70f7efcf

View File

@@ -1,8 +1,13 @@
import open from "open"; import open, { apps } from "open";
async function openBrowser(url) { async function openBrowser(url) {
try { try {
await open(url); await open(url, {
wait: false,
app: {
name: apps.edge
}
});
console.log(`Browser opened to ${url}`); console.log(`Browser opened to ${url}`);
} catch (error) { } catch (error) {
console.error(`Failed to open browser: ${error}`); console.error(`Failed to open browser: ${error}`);