Files
hydro-builder-app/node_modules/concurrently/dist/bin/normalize-cli-command.js
2026-06-13 17:36:44 -07:00

16 lines
385 B
JavaScript

export function normalizeCliCommand(command) {
if (command.length < 2) {
return command;
}
const quote = command[0];
const last = command.at(-1);
if ((quote !== '"' && quote !== "'") || last !== quote) {
return command;
}
const inner = command.slice(1, -1);
if (inner.includes(quote)) {
return command;
}
return inner;
}