smartopen/ts/index.ts
2019-04-16 08:26:16 +02:00

14 lines
286 B
TypeScript

import open = require('opn');
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;
}
};