fix(cli): improve changelog release handling and TypeScript compatibility
This commit is contained in:
@@ -15,7 +15,7 @@ export const isTemplate = async (templateNameArg: string) => {
|
||||
};
|
||||
|
||||
export const getTemplate = async (templateNameArg: string) => {
|
||||
if (isTemplate(templateNameArg)) {
|
||||
if (await isTemplate(templateNameArg)) {
|
||||
const localScafTemplate = new plugins.smartscaf.ScafTemplate(
|
||||
getTemplatePath(templateNameArg),
|
||||
);
|
||||
@@ -50,6 +50,10 @@ export const run = async (argvArg: any) => {
|
||||
}
|
||||
|
||||
const localScafTemplate = await getTemplate(chosenTemplate);
|
||||
if (!localScafTemplate) {
|
||||
logger.log('error', `Template ${chosenTemplate} not available`);
|
||||
return;
|
||||
}
|
||||
await localScafTemplate.askCliForMissingVariables();
|
||||
await localScafTemplate.writeToDisk(paths.cwd);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user