Skip to content

Commit

Permalink
Fixed a bug which leads to an empty manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2-nomo committed Nov 29, 2023
1 parent 2ffc07e commit ecf9e81
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ async function generateNomoManifestContent({
},
]);

const permissions = selectedPermissions.length > 0 ? selectedPermissions : [];

return {
nomo_manifest_version: "1.1.0",
webon_id: webonId,
webon_name: webonName,
webon_version: "0.1.0",
min_nomo_version: "0.3.4",
permissions: selectedPermissions,
permissions: permissions,
};
}

Expand Down Expand Up @@ -85,17 +87,18 @@ function generateNomoCliConfigContent({
};
}


function writeFile(file: GeneratedFile): Promise<void> {
return new Promise((resolve, reject) => {
fs.writeFile(file.filePath, file.content, (err) => {
if (err) {
console.error(`Error writing file ${file.filePath}:`, err);
reject(err);
} else {
console.log("\x1b[32m",
`${path.basename(file.filePath)} created successfully.`,
"\x1b[0m");
console.log(
"\x1b[32m",
`${path.basename(file.filePath)} created successfully.`,
"\x1b[0m"
);
resolve();
}
});
Expand Down

0 comments on commit ecf9e81

Please sign in to comment.