@oclif/core 2.0.9 → 2.0.10

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.
@@ -189,13 +189,18 @@ class Parser {
189
189
  }
190
190
  else {
191
191
  const input = token.input;
192
- this._validateOptions(flag, input);
193
192
  if (flag.delimiter && flag.multiple) {
194
- const values = await Promise.all(input.split(flag.delimiter).map(async (v) => this._parseFlag(v.trim(), flag, token)));
193
+ // split, trim, and remove surrounding doubleQuotes (which would hav been needed if the elements contain spaces)
194
+ const values = await Promise.all(input.split(flag.delimiter).map(async (v) => this._parseFlag(v.trim().replace(/^"(.*)"$/, '$1').replace(/^'(.*)'$/, '$1'), flag, token)));
195
+ // then parse that each element aligns with the `options` property
196
+ for (const v of values) {
197
+ this._validateOptions(flag, v);
198
+ }
195
199
  flags[token.flag] = flags[token.flag] || [];
196
200
  flags[token.flag].push(...values);
197
201
  }
198
202
  else {
203
+ this._validateOptions(flag, input);
199
204
  const value = await this._parseFlag(input, flag, token);
200
205
  if (flag.multiple) {
201
206
  flags[token.flag] = flags[token.flag] || [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.0.9",
4
+ "version": "2.0.10",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {