Enhance openBrowser function to specify Edge as the browser and enable wait option
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import open from "open";
|
||||
import open, { apps } from "open";
|
||||
|
||||
async function openBrowser(url) {
|
||||
try {
|
||||
await open(url);
|
||||
await open(url, {
|
||||
wait: false,
|
||||
app: {
|
||||
name: apps.edge
|
||||
}
|
||||
});
|
||||
console.log(`Browser opened to ${url}`);
|
||||
} catch (error) {
|
||||
console.error(`Failed to open browser: ${error}`);
|
||||
|
||||
Reference in New Issue
Block a user