Skip to content

Commit

Permalink
fix(core): inotify error does not propagate correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Oct 24, 2022
1 parent 5837715 commit b403017
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/nx/src/daemon/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export async function startServer(): Promise<Server> {

return resolve(server);
} catch (err) {
reject(err);
await handleWorkspaceChanges(err, []);
}
});
} catch (err) {
Expand Down
16 changes: 9 additions & 7 deletions packages/nx/src/project-graph/project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ export async function createProjectGraphAsync(
}
return await daemonClient.getProjectGraph();
} catch (e) {
if (!e.internalDaemonError) {
handleProjectGraphError(opts, e);
}

if (e.message.indexOf('inotify_add_watch') > -1) {
// common errors with the daemon due to OS settings (cannot watch all the files available)
output.note({
Expand All @@ -149,7 +145,11 @@ export async function createProjectGraphAsync(
'Nx Daemon is going to be disabled until you run "nx reset".',
],
});
} else {
markDaemonAsDisabled();
return buildProjectGraphWithoutDaemon();
}

if (e.internalDaemonError) {
const errorLogFile = writeDaemonLogs(e.message);
output.warn({
title: `Nx Daemon was not able to compute the project graph.`,
Expand All @@ -159,9 +159,11 @@ export async function createProjectGraphAsync(
'Nx Daemon is going to be disabled until you run "nx reset".',
],
});
markDaemonAsDisabled();
return buildProjectGraphWithoutDaemon();
}
markDaemonAsDisabled();
return buildProjectGraphWithoutDaemon();

handleProjectGraphError(opts, e);
}
}
}
Expand Down

0 comments on commit b403017

Please sign in to comment.