[x] Unit or Functional tests are included in the PR
Description:
In a number of performance related PR's (like https://github.com/dojo/cli/pull/283), we stopped loading all the installed commands if a group was provided to the cli. For example:
dojo create ____
The above would only glob for paths with cli-create and only load those too.
This is fine for normal interactive use of the cli to run commands, but commands such as cli-create-app can use the command helper to programmatically call another command. In this case that was dojo init. Because of the above, the determined group was still create (because passed in the terminal by the user), which meant that dojo init would only find commands by that name.
The code in cli is pretty convoluted, so the easiest way for me to fix this was to lift the argv bit out of enumerateInstalledCommands, and take the group in specifically. Not pretty, but it will do.
Type: bug
The following has been addressed in the PR:
prettier
as per the readme code style guidelinesDescription: In a number of performance related PR's (like https://github.com/dojo/cli/pull/283), we stopped loading all the installed commands if a group was provided to the cli. For example:
The above would only glob for paths with
cli-create
and only load those too.This is fine for normal interactive use of the cli to run commands, but commands such as cli-create-app can use the command helper to programmatically call another command. In this case that was
dojo init
. Because of the above, the determined group was stillcreate
(because passed in the terminal by the user), which meant thatdojo init
would only find commands by that name.The code in cli is pretty convoluted, so the easiest way for me to fix this was to lift the
argv
bit out ofenumerateInstalledCommands
, and take the group in specifically. Not pretty, but it will do.Resolves https://github.com/dojo/cli/issues/299 Resolves https://github.com/dojo/cli/issues/305