From d30ba7f7345477e3ca64da3f1bb45526cc13d549 Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Thu, 25 Jan 2024 14:28:08 +0100 Subject: [PATCH] fix(core): remove deprecated recursive rmdir with rm -rf --- packages/nx/src/daemon/tmp-dir.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/daemon/tmp-dir.ts b/packages/nx/src/daemon/tmp-dir.ts index faeb340d1fa2a..87327421d2d87 100644 --- a/packages/nx/src/daemon/tmp-dir.ts +++ b/packages/nx/src/daemon/tmp-dir.ts @@ -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) {} }