1 | ;
|
2 |
|
3 | const { exec } = require("child_process");
|
4 |
|
5 | module.exports.launchChrome = function(url) {
|
6 | const { platform } = process;
|
7 |
|
8 | if (platform === "win32") {
|
9 | exec(`start chrome ${url}`);
|
10 | } else if (platform === "darwin") {
|
11 | exec(`open -a "Google Chrome" ${url}`);
|
12 | } else if (platform === "linux") {
|
13 | exec(`google-chrome ${url}`);
|
14 | }
|
15 | };
|