From 569a8c0eeb5e1e1e9d16e77f99284026f734a170 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Mon, 9 Nov 2020 09:09:01 -0600 Subject: [PATCH] replace lodash find when looking up commands --- src/cli_encryption_key/cli_encryption_key.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cli_encryption_key/cli_encryption_key.js b/src/cli_encryption_key/cli_encryption_key.js index 3582e045cdb1c..9b506b4f564e4 100644 --- a/src/cli_encryption_key/cli_encryption_key.js +++ b/src/cli_encryption_key/cli_encryption_key.js @@ -17,8 +17,6 @@ * under the License. */ -import _ from 'lodash'; - import { pkg } from '../core/server/utils'; import Command from '../cli/command'; import { EncryptionConfig } from './encryption_config'; @@ -40,7 +38,7 @@ program .command('help ') .description('Get the help for a specific command') .action(function (cmdName) { - const cmd = _.find(program.commands, { _name: cmdName }); + const cmd = Object.values(program.commands).find((command) => command._name === cmdName); if (!cmd) return program.error(`unknown command ${cmdName}`); cmd.help(); });