From 5712abe670f0ddf52a7e511e4f39ab4d054b93fd Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Thu, 23 Mar 2023 11:18:49 -0400 Subject: [PATCH] Revert "fix(core): use relative paths for socket path (#10896)" (#15857) --- packages/nx/src/daemon/socket-utils.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/nx/src/daemon/socket-utils.ts b/packages/nx/src/daemon/socket-utils.ts index 43a4a239c6c82..70cbbc2be7953 100644 --- a/packages/nx/src/daemon/socket-utils.ts +++ b/packages/nx/src/daemon/socket-utils.ts @@ -1,9 +1,7 @@ import { unlinkSync } from 'fs'; import { platform } from 'os'; -import { relative, resolve } from 'path'; +import { resolve } from 'path'; import { DAEMON_SOCKET_PATH } from './tmp-dir'; -import { ProjectGraph } from '../config/project-graph'; -import { workspaceRoot } from '../utils/workspace-root'; export const isWindows = platform() === 'win32'; @@ -12,12 +10,10 @@ export const isWindows = platform() === 'win32'; * * See https://nodejs.org/dist/latest-v14.x/docs/api/net.html#net_identifying_paths_for_ipc_connections for a full breakdown * of OS differences between Unix domain sockets and named pipes. - * - * Updated non-windows platforms to use relative paths allowing for workspaces that exist in long paths. */ export const FULL_OS_SOCKET_PATH = isWindows ? '\\\\.\\pipe\\nx\\' + resolve(DAEMON_SOCKET_PATH) - : relative(workspaceRoot, resolve(DAEMON_SOCKET_PATH)); + : resolve(DAEMON_SOCKET_PATH); export function killSocketOrPath(): void { try {