UNPKG

727 BJavaScriptView Raw
1"use strict";
2/**
3 * @copyright 2017, Miles Johnson
4 * @license https://opensource.org/licenses/MIT
5 */
6Object.defineProperty(exports, "__esModule", { value: true });
7/**
8 * Quote the values of special options so that yargs doesnt parse any
9 * flags/options within the value.
10 */
11function quoteSpecialOptions(argv) {
12 var args = [];
13 argv.forEach(function (arg) {
14 if (arg.startsWith('--parallel')) {
15 if (arg.includes('=')) {
16 var _a = arg.split('=', 2), opt = _a[0], value = _a[1];
17 args.push(opt + "=\"" + value + "\"");
18 }
19 }
20 else {
21 args.push(arg);
22 }
23 });
24 return args;
25}
26exports.default = quoteSpecialOptions;