Skip to content

Commit

Permalink
fix(core): ensure safe removal of folders on daemon reset (#16766)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored May 4, 2023
1 parent 17e6db5 commit b7b04a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/nx/src/command-line/reset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { removeSync } from 'fs-extra';
import { rmSync } from 'fs-extra';
import { daemonClient } from '../daemon/client/client';
import { cacheDir, projectGraphCacheDirectory } from '../utils/cache-directory';
import { output } from '../utils/output';
Expand All @@ -10,9 +10,9 @@ export async function resetHandler() {
});
await daemonClient.stop();
output.log({ title: 'Daemon Server - Stopped' });
removeSync(cacheDir);
rmSync(cacheDir, { recursive: true, force: true });
if (projectGraphCacheDirectory !== cacheDir) {
removeSync(projectGraphCacheDirectory);
rmSync(projectGraphCacheDirectory, { recursive: true, force: true });
}
output.success({
title: 'Successfully reset the Nx workspace.',
Expand Down

1 comment on commit b7b04a7

@vercel
Copy link

@vercel vercel bot commented on b7b04a7 May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.