aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/concurrently/dist/src/command-parser/strip-quotes.js
blob: 971a52419736db08e4bf53c130be41fea800d90d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StripQuotes = void 0;
/**
 * Strips quotes around commands so that they can run on the current shell.
 */
class StripQuotes {
    parse(commandInfo) {
        let { command } = commandInfo;
        // Removes the quotes surrounding a command.
        if (/^"(.+?)"$/.test(command) || /^'(.+?)'$/.test(command)) {
            command = command.slice(1, command.length - 1);
        }
        return { ...commandInfo, command };
    }
}
exports.StripQuotes = StripQuotes;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage