@oclif/core 3.7.0 → 3.7.1
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/lib/config/config.js +9 -0
- package/package.json +1 -1
package/lib/config/config.js
CHANGED
|
@@ -686,6 +686,15 @@ class Config {
|
|
|
686
686
|
insertLegacyPlugins(plugins) {
|
|
687
687
|
for (const plugin of plugins) {
|
|
688
688
|
this.plugins.set(plugin.name, plugin);
|
|
689
|
+
// Delete all commands from the legacy plugin so that we can re-add them.
|
|
690
|
+
// This is necessary because this.determinePriority will pick the initial
|
|
691
|
+
// command that was added, which won't have been converted by PluginLegacy yet.
|
|
692
|
+
for (const cmd of plugin.commands ?? []) {
|
|
693
|
+
this._commands.delete(cmd.id);
|
|
694
|
+
for (const alias of [...(cmd.aliases ?? []), ...(cmd.hiddenAliases ?? [])]) {
|
|
695
|
+
this._commands.delete(alias);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
689
698
|
this.loadCommands(plugin);
|
|
690
699
|
}
|
|
691
700
|
}
|