Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/lib/commands/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const doc: DocCommandType = {
if (!argv.term) {
const answer = await PromptSession.chooseTerm();
argv.term = answer;
await this.handler(argv);
await doc.handler(argv);
} else if (!Util.isAlphanumericExt(argv.term)) {
return Util.error(`The search term '${argv.term}' is not valid.` + "\n" +
"Name should start with a letter and can also contain numbers, dashes and spaces.",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const command: CommandType = {
const templatesByGroup = [];
const controlGroups: string[] = [];

const framework: Framework = this.templateManager.getFrameworkById(argv.framework);
const framework: Framework = command.templateManager.getFrameworkById(argv.framework);
if (!framework) {
return Util.error("Wrong framework provided", "red");
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/commands/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface CommandType extends CommandModule<{}, any> {
templateManager?: TemplateManager;

/** Handler function that will be called by yargs after the command line has been parsed. */
handler(argv: ArgumentsCamelCase<PositionalArgs>);
handler(/** do not use `this` in handler */this: void, argv: ArgumentsCamelCase<PositionalArgs>);
}

export interface NewCommandType extends CommandType {
Expand Down
Loading