fix(core): remove deprecated recursive rmdir with rm -rf (#21327)

This commit is contained in:
Miroslav Jonaš 2024-01-25 15:05:39 +01:00 committed by GitHub
parent e4daf33601
commit 269fa1a75f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
* and where we create the actual unix socket/named pipe for the daemon.
*/
import { statSync, writeFileSync } from 'fs';
import { ensureDirSync, rmdirSync } from 'fs-extra';
import { ensureDirSync, rmSync } from 'fs-extra';
import { join } from 'path';
import { projectGraphCacheDirectory } from '../utils/cache-directory';
import { createHash } from 'crypto';
@ -71,6 +71,6 @@ function createSocketDir() {
export function removeSocketDir() {
try {
rmdirSync(socketDir, { recursive: true });
rmSync(socketDir, { recursive: true, force: true });
} catch (e) {}
}