1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function checkCommand(commands, depth = 0) {
|
4 | return (argv) => {
|
5 | const executedCommand = argv._[depth];
|
6 | for (const cmd of commands) {
|
7 | if (executedCommand === cmd) {
|
8 | return true;
|
9 | }
|
10 | }
|
11 | throw new Error(`Unknown command: ${executedCommand}`);
|
12 | };
|
13 | }
|
14 | exports.checkCommand = checkCommand;
|