Comparing version 0.1.0 to 0.1.1
17
index.js
'use strict'; | ||
var path = require('path'); | ||
var execFile = require('child_process').execFile; | ||
@@ -19,4 +20,7 @@ | ||
cmd = 'open'; | ||
args.push('-W'); | ||
if (cb) { | ||
args.push('-W'); | ||
} | ||
if (app) { | ||
@@ -27,4 +31,8 @@ args.push('-a', app); | ||
cmd = 'cmd'; | ||
args.push('/c', 'start', '/wait'); | ||
args.push('/c', 'start'); | ||
if (cb) { | ||
args.push('/wait'); | ||
} | ||
if (app) { | ||
@@ -38,3 +46,3 @@ args.push(app); | ||
// http://portland.freedesktop.org/download/xdg-utils-1.1.0-rc1.tar.gz | ||
cmd = './xdg-open'; | ||
cmd = path.join(__dirname, 'xdg-open'); | ||
} | ||
@@ -45,3 +53,4 @@ } | ||
execFile(cmd, args, cb); | ||
// xdg-open will block the process unless stdio is ignored | ||
execFile(cmd, args, {stdio: 'ignore'}, cb); | ||
}; |
{ | ||
"name": "opn", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"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
17536
66