Skip to content

Commit

Permalink
Revert "fix(core): use relative paths for socket path (#10896)" (#15857)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored Mar 23, 2023
1 parent e611a0b commit 5712abe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/nx/src/daemon/socket-utils.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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 {
Expand Down

1 comment on commit 5712abe

@vercel
Copy link

@vercel vercel bot commented on 5712abe Mar 23, 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-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.