mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-24 13:59:27 +08:00
15 lines
289 B
JavaScript
15 lines
289 B
JavaScript
var sh = require('shelljs')
|
|
, debug = require('debug')('open');
|
|
|
|
module.exports = function(url) {
|
|
var command = 'open';
|
|
|
|
url = url || '';
|
|
|
|
if (process.platform === 'win32') {
|
|
command = 'start';
|
|
}
|
|
command += ' ' + url;
|
|
debug(command);
|
|
sh.exec(command, {async: true});
|
|
} |