smartopen/ts/index.ts

14 lines
284 B
TypeScript
Raw Normal View History

import open = require('opn');
import { ChildProcess } from 'child_process';
2017-03-12 20:20:43 +00:00
export let openUrl = async urlArg => {
if(!(process.env.CI === 'true')) {
const childProcess = await open(urlArg, {
wait: false
});
return childProcess;
} else {
return null
}
};