Skip to content

Commit

Permalink
check if angular.json exists
Browse files Browse the repository at this point in the history
  • Loading branch information
natedanner committed Sep 24, 2024
1 parent d5c047b commit 4bcc7b1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ public Collection<? extends SourceFile> generate(Accumulator acc, ExecutionConte

private void runNode(Accumulator acc, ExecutionContext ctx) {
Path dir = acc.getDirectory();
// Path nodeModules = RecipeResources.from(getClass()).init(ctx);

Path angularJsonPath = dir.resolve("angular.json");
// Check if the file exists
if (!Files.exists(angularJsonPath)) {
throw new RuntimeException("angular.json file not found in the project directory: " + dir);
}

Path nodeModules = createDirectory(ctx, "recipe-run-modules");
boolean useNvmExec = useNvmExec(acc, ctx);
List<String> command = getNpmCommand(acc, ctx);
Expand Down

0 comments on commit 4bcc7b1

Please sign in to comment.