Skip to content

Commit

Permalink
fix: while load devkits,check the directoryPath first; make error spe…
Browse files Browse the repository at this point in the history
…cific
  • Loading branch information
karltao committed May 15, 2020
1 parent 0ce7004 commit 9cbc591
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/feflow-cli/src/core/devkit/loadDevkits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ export default function loadDevkits(ctx: any): Promise<void> {
registerDevkitCommand(command, commandConfig, directoryPath, ctx);
}
} else {
ctx.logger.error('Your project config is not correct.');
if (path.basename(directoryPath) === '.fef') {
ctx.logger.debug('Run commands in .fef root will not work.');
} else {
ctx.logger.error(
`A config file .feflowrc(.js|.yaml|.yml) was detected in ${directoryPath}, but lost required property 'commands' in field 'devkit'. Please check your config file or just delete it.`,
);
}
}
} else {
ctx.logger.debug('Run commands not in a feflow project.');
Expand Down

0 comments on commit 9cbc591

Please sign in to comment.