@oclif/core 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.6.2](https://github.com/oclif/core/compare/v1.6.1...v1.6.2) (2022-03-23)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * load correct plugin when using dynamic help ([#394](https://github.com/oclif/core/issues/394)) ([15c1fbe](https://github.com/oclif/core/commit/15c1fbe1e870b6da1372a5786a9ffb09746ce8f6))
11
+
5
12
  ### [1.6.1](https://github.com/oclif/core/compare/v1.6.0...v1.6.1) (2022-03-17)
6
13
 
7
14
 
package/lib/help/index.js CHANGED
@@ -87,7 +87,7 @@ class Help extends HelpBase {
87
87
  const command = this.config.findCommand(subject);
88
88
  if (command) {
89
89
  if (command.hasDynamicHelp) {
90
- const dynamicCommand = await (0, config_1.toCached)(await this.getDynamicCommand(command.id));
90
+ const dynamicCommand = await (0, config_1.toCached)(await this.getDynamicCommand(command));
91
91
  await this.showCommandHelp(dynamicCommand);
92
92
  }
93
93
  else {
@@ -110,12 +110,12 @@ class Help extends HelpBase {
110
110
  }
111
111
  (0, errors_1.error)(`Command ${subject} not found.`);
112
112
  }
113
- async getDynamicCommand(cmdName) {
114
- const plugin = new plugin_1.Plugin({ ignoreManifest: true, root: this.config.root });
113
+ async getDynamicCommand(command) {
114
+ const plugin = new plugin_1.Plugin({ ignoreManifest: true, root: this.config.root, name: command.pluginName });
115
115
  await plugin.load();
116
- const cmd = await plugin.findCommand(cmdName);
116
+ const cmd = await plugin.findCommand(command.id);
117
117
  if (!cmd) {
118
- throw new Error(`Command ${cmdName} not found.`);
118
+ throw new Error(`Command ${command.id} not found.`);
119
119
  }
120
120
  return cmd;
121
121
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "1.6.1",
4
+ "version": "1.6.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {