🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

shell-quote

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-quote - npm Package Compare versions

Comparing version

to
1.7.1

3

CHANGELOG.md

@@ -7,2 +7,5 @@ # acorn-node change log

## 1.7.1
* Fix `$` being removed when not part of an environment variable name. ([@Adman](https://github.com/Admin) in [#32](https://github.com/substack/node-shell-quote/pull/32))
## 1.7.0

@@ -9,0 +12,0 @@ * Add support for parsing `>>` and `>&` redirection operators. ([@forivall](https://github.com/forivall) in [#16](https://github.com/substack/node-shell-quote/pull/16))

5

index.js

@@ -193,3 +193,6 @@ exports.quote = function (xs) {

var r = typeof env === 'function' ? env(key) : env[key];
if (r === undefined) r = '';
if (r === undefined && key != '')
r = '';
else if (r === undefined)
r = '$';

@@ -196,0 +199,0 @@ if (typeof r === 'object') {

{
"name": "shell-quote",
"description": "quote and parse shell commands",
"version": "1.7.0",
"version": "1.7.1",
"author": {

@@ -6,0 +6,0 @@ "name": "James Halliday",

@@ -13,2 +13,4 @@ var test = require('tape');

t.same(parse("qrs${zzz}wxy"), [ 'qrswxy' ]);
t.same(parse("qrs$wxy $"), [ 'qrs', '$' ]);
t.same(parse('grep "xy$"'), [ 'grep', 'xy$' ]);
t.same(parse("ab$x", { x: 'c' }), [ 'abc' ]);

@@ -15,0 +17,0 @@ t.same(parse("ab\\$x", { x: 'c' }), [ 'ab$x' ]);