2019-09-05 15:17:33 +00:00
|
|
|
import open from 'open';
|
2017-03-12 20:20:43 +00:00
|
|
|
|
2022-03-18 01:15:17 +00:00
|
|
|
export let openUrl = async (urlArg: string) => {
|
2019-04-16 06:26:16 +00:00
|
|
|
if (!(process.env.CI === 'true')) {
|
2018-05-22 11:42:21 +00:00
|
|
|
const childProcess = await open(urlArg, {
|
2022-03-18 01:15:17 +00:00
|
|
|
wait: false,
|
2018-05-22 11:42:21 +00:00
|
|
|
});
|
|
|
|
return childProcess;
|
|
|
|
} else {
|
2019-04-16 06:26:16 +00:00
|
|
|
return null;
|
2018-05-22 11:42:21 +00:00
|
|
|
}
|
2018-05-22 11:29:49 +00:00
|
|
|
};
|