Skip to content

Commit

Permalink
chore(core): error when a project graph plugin fails
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Apr 4, 2023
1 parent c02ec9f commit d4ddef3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/nx/src/project-graph/build-project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
} from '../config/project-graph';
import { readJsonFile } from '../utils/fileutils';
import { NxJsonConfiguration } from '../config/nx-json';
import { logger } from '../utils/logger';
import { ProjectGraphBuilder } from './project-graph-builder';
import {
ProjectConfiguration,
Expand Down Expand Up @@ -235,15 +234,8 @@ async function updateProjectGraphWithPlugins(
try {
graph = await plugin.processProjectGraph(graph, context);
} catch (e) {
const message = `Failed to process the project graph with "${plugin.name}". This will error in the future!`;
if (process.env.NX_VERBOSE_LOGGING === 'true') {
console.error(e);
logger.error(message);
return graph;
} else {
logger.warn(message);
logger.warn(`Run with NX_VERBOSE_LOGGING=true to see the error.`);
}
const message = `Failed to process the project graph with "${plugin.name}".`;
throw new Error(message + '\n' + e.stack);
}
}
return graph;
Expand Down

0 comments on commit d4ddef3

Please sign in to comment.