smartopen/ts/index.ts
2019-09-05 17:17:33 +02:00

14 lines
281 B
TypeScript

import open from 'open';
import { ChildProcess } from 'child_process';
export let openUrl = async urlArg => {
if (!(process.env.CI === 'true')) {
const childProcess = await open(urlArg, {
wait: false
});
return childProcess;
} else {
return null;
}
};