1
0

error on formating plug sections

This commit is contained in:
Guillermo Vaya 2022-07-29 18:26:42 +02:00
parent a01578a7ff
commit b1d02ca776

View File

@ -38,7 +38,12 @@ export async function updatePlugsCommand() {
export async function updatePlugs() { export async function updatePlugs() {
let plugList: string[] = []; let plugList: string[] = [];
try { try {
plugList = await readYamlPage("PLUGS"); const plugListRead: any[] = await readYamlPage("PLUGS");
console.log(plugList);
plugList = plugListRead.filter((plug) => typeof plug === 'string');
if (plugList.length !== plugListRead.length) {
throw new Error(`Some of the plugs were not in a yaml list format, they were ignored`);
}
} catch (e: any) { } catch (e: any) {
throw new Error(`Error processing PLUGS: ${e.message}`); throw new Error(`Error processing PLUGS: ${e.message}`);
} }