ssh-config
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -0,1 +1,7 @@ | ||
4.0.3 / 2020-08-24 | ||
================== | ||
* fix: quote values that contain white spaces | ||
4.0.2 / 2020-02-09 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -8,2 +8,3 @@ 'use strict' | ||
const RE_SECTION_DIRECTIVE = /^(Host|Match)$/i | ||
const RE_MULTI_VALUE_DIRECTIVE = /^(GlobalKnownHostsFile|Host|IPQoS|SendEnv|UserKnownHostsFile)$/i | ||
@@ -175,3 +176,3 @@ const DIRECTIVE = 1 | ||
const quoted = line.quoted | ||
|| (/IdentityFile/i.test(line.param) && RE_SPACE.test(line.value)) | ||
|| (!/Command$/i.test(line.param) && RE_SPACE.test(line.value)) | ||
const value = formatValue(line.value, quoted) | ||
@@ -304,3 +305,3 @@ str += `${line.param}${line.separator}${value}` | ||
// Host "foo bar" | ||
function patterns() { | ||
function values() { | ||
const results = [] | ||
@@ -350,3 +351,3 @@ let val = '' | ||
// Host "foo bar" baz | ||
const multiple = param.toLowerCase() == 'host' | ||
const multiple = RE_MULTI_VALUE_DIRECTIVE.test(param) | ||
const result = { | ||
@@ -357,3 +358,3 @@ type, | ||
quoted: !multiple && chr === '"', | ||
value: multiple ? patterns() : value() | ||
value: multiple ? values() : value() | ||
} | ||
@@ -360,0 +361,0 @@ if (!result.quoted) delete result.quoted |
{ | ||
"name": "ssh-config", | ||
"description": "SSH config parser and stringifier", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"author": "Chen Yangjian (https://www.cyj.me)", | ||
@@ -6,0 +6,0 @@ "repository": { |
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
18948
357