Skip to content

Commit

Permalink
fix(core): handle nullable lock when creating project graph (#30000)
Browse files Browse the repository at this point in the history
## Current Behavior

The project graph construction can throw an error when the lock is not
created:
#29821 (comment).

## Expected Behavior

The project graph construction should correctly handle the nullable
lock.

## Related Issue(s)

Fixes #
  • Loading branch information
leosvelperez authored and jaysoo committed Feb 12, 2025
1 parent fe65d78 commit e09a5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nx/src/project-graph/project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export async function createProjectGraphAndSourceMapsAsync(
} catch (e) {
handleProjectGraphError(opts, e);
} finally {
lock.unlock();
lock?.unlock();
}
} else {
try {
Expand Down

0 comments on commit e09a5b5

Please sign in to comment.