ssh-config 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ssh-config",
3
3
  "description": "SSH config parser and stringifier",
4
- "version": "5.0.2",
4
+ "version": "5.0.3",
5
5
  "author": "Chen Yangjian (https://www.cyj.me)",
6
6
  "repository": {
7
7
  "type": "git",
package/src/ssh-config.js CHANGED
@@ -118,7 +118,9 @@ class SSHConfig extends Array {
118
118
  let val;
119
119
  if (Array.isArray(value)) {
120
120
  if (/ProxyCommand/i.test(name)) {
121
- val = value.map(({ val, separator }) => `${separator}${val}`).join('').trim();
121
+ val = value.map(({ val, separator, quoted }) => {
122
+ return `${separator}${quoted ? `"${val.replace(/"/g, '\\"')}"` : val}`;
123
+ }).join('').trim();
122
124
  }
123
125
  else {
124
126
  val = value.map(({ val }) => val);