Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opn

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opn - npm Package Compare versions

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();
}
};

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc