Comparing version 1.0.1 to 1.0.2
19
index.js
'use strict'; | ||
var path = require('path'); | ||
var execFile = require('child_process').execFile; | ||
var childProcess = require('child_process'); | ||
@@ -51,4 +51,17 @@ module.exports = function (target, app, cb) { | ||
// xdg-open will block the process unless stdio is ignored | ||
execFile(cmd, args, {stdio: 'ignore'}, cb); | ||
var opts = {}; | ||
if (!cb) { | ||
// xdg-open will block the process unless stdio is ignored even if it's unref()'d | ||
opts.stdio = 'ignore'; | ||
} | ||
var cp = childProcess.spawn(cmd, args, opts); | ||
if (cb) { | ||
cp.once('error', cb); | ||
cp.once('close', cb); | ||
} else { | ||
cp.unref(); | ||
} | ||
}; |
{ | ||
"name": "opn", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A better node-open. Opens stuff like websites, files, executables. Cross-platform.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24702
79