Skip to content

Commit

Permalink
packageEmpty error handling done
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeManSu committed Mar 12, 2024
1 parent 131c1bc commit e2cb415
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ export const installDependencies = async (): Promise<void> => {
};

//check if repo contains metacall-*.json if not create and calculate runners then install dependencies
export const calculatePackages = async (): Promise<void> => {
export const calculatePackages = async (next: NextFunction): Promise<void> => {
const data = await generatePackage(currentFile.path);

if (data.error == PackageError.Empty) throw PackageError.Empty;
if (data.error == PackageError.Empty) {
return next(new Error(PackageError.Empty));
}
// currentFile.jsons = JSON.parse(data.jsons.toString()); FIXME Fix this line
currentFile.runners = data.runners;
};
Expand Down

0 comments on commit e2cb415

Please sign in to comment.