There was an error while loading. Please reload this page.
1 parent ef7db12 commit a49b6c0Copy full SHA for a49b6c0
1 file changed
src/cli.ts
@@ -51,7 +51,8 @@ program.addCommand(versionCmd)
51
// invoked. For all other invocations (including `elastic --help`), a lightweight stub
52
// is registered so the group appears in help text without paying the cost of loading
53
// and compiling all API schemas.
54
-const firstArg = process.argv[2]
+const { operands } = program.parseOptions(process.argv.slice(2))
55
+const firstArg = operands[0]
56
57
if (firstArg === 'es') {
58
const { registerEsCommands } = await import('./es/register.ts')
0 commit comments