From 269fa1a75f86dbba84193100b62384b50ce691f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Thu, 25 Jan 2024 15:05:39 +0100 Subject: [PATCH] fix(core): remove deprecated recursive rmdir with rm -rf (#21327) --- 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 faeb340d1f..87327421d2 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) {} }