Skip to content

Commit

Permalink
replace lodash find when looking up commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Nov 9, 2020
1 parent 6b8e023 commit 569a8c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cli_encryption_key/cli_encryption_key.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -40,7 +38,7 @@ program
.command('help <command>')
.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();
});
Expand Down

0 comments on commit 569a8c0

Please sign in to comment.