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

executive

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

executive - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

test/_helper.js

35

index.js

@@ -20,3 +20,3 @@ var child_process = require('child_process'),

function bufferedExec(cmd, args, callback) {
function bufferedExec(cmd, args, env, callback) {
var err = '',

@@ -59,3 +59,3 @@ out = '';

var child = child_process.spawn(cmd, args, {stdio: [0, 'pipe', 'pipe']});
var child = child_process.spawn(cmd, args, {env: env, stdio: [0, 'pipe', 'pipe']});

@@ -71,3 +71,3 @@ child.setMaxListeners(0);

child.on('exit', function(code) {
child.on('close', function(code) {
stdout.destroy();

@@ -81,4 +81,4 @@ stderr.destroy();

function interactiveExec(cmd, args, callback) {
var child = child_process.spawn(cmd, args, {stdio: [0, 1, 2]});
function interactiveExec(cmd, args, env, callback) {
var child = child_process.spawn(cmd, args, {env: env, stdio: [0, 1, 2]});

@@ -95,4 +95,4 @@ child.setMaxListeners(0);

// Do not echo to stdout/stderr
function quietExec(cmd, args, callback) {
var child = child_process.spawn(cmd, args),
function quietExec(cmd, args, env, callback) {
var child = child_process.spawn(cmd, args, {env: env}),
err = '',

@@ -121,4 +121,7 @@ out = '';

function exec(args, options, callback) {
var _var, cmd, arg;
var env = {}, e, cmd, arg;
// Copy enviromental variables from process.env.
for (e in process.env) env[e] = process.env[e];
// Reverse arguments, javascript does not support lookbehind assertions so

@@ -139,8 +142,8 @@ // we'll use a lookahead assertion instead in our regex later.

while ((cmd = args.shift()).indexOf('=') != -1) {
_var = cmd.split('=');
e = cmd.split('=');
if (_var.length != 2)
if (e.length != 2)
throw new Error('Invalid enviromental variable specified.');
env[_var[0]] = _var[1];
env[e[0]] = e[1];

@@ -154,8 +157,8 @@ if (args.length === 0)

if (options.quiet)
return quietExec(cmd, args, callback);
return quietExec(cmd, args, env, callback);
if (options.interactive)
return interactiveExec(cmd, args, callback);
return interactiveExec(cmd, args, env, callback);
return bufferedExec(cmd, args, callback);
return bufferedExec(cmd, args, env, callback);
}

@@ -241,2 +244,6 @@

wrapper.bufferedExec = bufferedExec
wrapper.quietExec = quietExec
wrapper.interactiveExec = interactiveExec
module.exports = wrapper;

6

package.json
{
"name": "executive",
"version": "0.2.5",
"version": "0.2.6",
"description": "exec for the lazy",

@@ -21,5 +21,5 @@ "main": "index.js",

"devDependencies": {
"chai": "~1.3.0",
"mocha": "~1.7.0"
"chai": "~1.6.0",
"mocha": "~1.9.0"
}
}

Sorry, the diff of this file is not supported yet

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