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 1.0.4 to 1.0.5

30

lib/parse.js
// Generated by CoffeeScript 1.10.0
var argsObject, argsString, isString, isWin, path, ref, shellQuote;
var argsObject, argsString, isString, isWin, path, ref, shellQuote, shellRequired;

@@ -10,7 +10,18 @@ path = require('path');

argsString = function(s, env) {
var args, cmd, k, ref1, v;
shellRequired = function(args) {
var arg, i, len;
for (i = 0, len = args.length; i < len; i++) {
arg = args[i];
if (!isString(arg)) {
return true;
}
}
return false;
};
argsString = function(s, opts, env) {
var args, cmd, k, ref1, ref2, v;
args = shellQuote.parse(s);
while (cmd = args.shift()) {
if (cmd.indexOf('=') === -1) {
if ((cmd.indexOf('=')) === -1) {
break;

@@ -21,6 +32,11 @@ }

}
if ((opts.shell != null) || shellRequired(args)) {
console.log('requiredShell');
cmd = (ref2 = opts.shell) != null ? ref2 : '/bin/sh';
args = ['-c', s];
}
return [cmd, args, env];
};
argsObject = function(obj, env) {
argsObject = function(obj, opts, env) {
var args, cmd, k, ref1, ref2, v;

@@ -46,5 +62,5 @@ cmd = obj.cmd;

if (isString(args)) {
ref2 = argsString(args, env), cmd = ref2[0], args = ref2[1], env = ref2[2];
ref2 = argsString(args, opts, env), cmd = ref2[0], args = ref2[1], env = ref2[2];
} else {
ref3 = argsObject(args, env), cmd = ref3[0], args = ref3[1], env = ref3[2];
ref3 = argsObject(args, opts, env), cmd = ref3[0], args = ref3[1], env = ref3[2];
}

@@ -51,0 +67,0 @@ opts.env = env;

{
"name": "executive",
"version": "1.0.4",
"version": "1.0.5",
"description": "Elegant command execution.",

@@ -5,0 +5,0 @@ "main": "lib/",

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