Skip to content

Commit

Permalink
fix(core): lower socket path by 10 chars to reduce chances of too-lon…
Browse files Browse the repository at this point in the history
…g paths (#28920)

## Current Behavior
Socket paths have quite a short allowed length. It's easy to hit the
maximum.

## Expected Behavior
We should exceed the maximum as rarely as possible. By lowering the
workspacePath hash portion, we reduce the chances of exceeding the path.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #27725

(cherry picked from commit be8029d)
  • Loading branch information
MaxKless authored and FrozenPandaz committed Nov 13, 2024
1 parent d59d84c commit 622c2ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nx/src/daemon/tmp-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function isDaemonDisabled() {
function socketDirName() {
const hasher = createHash('sha256');
hasher.update(workspaceRoot.toLowerCase());
const unique = hasher.digest('hex').substring(0, 20);
const unique = hasher.digest('hex').substring(0, 10);
return join(tmpdir, unique);
}

Expand Down

0 comments on commit 622c2ea

Please sign in to comment.