Skip to content

Commit

Permalink
fix(core): ensure daemon socket dir exists when specified in env (#23071
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AgentEnder committed Apr 29, 2024
1 parent 4fd731f commit cd7f3df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nx/src/daemon/tmp-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DAEMON_OUTPUT_LOG_FILE = join(
'daemon.log'
);

export const socketDir = process.env.NX_DAEMON_SOCKET_DIR || createSocketDir();
export const socketDir = createSocketDir();

export const DAEMON_SOCKET_PATH = join(
socketDir,
Expand Down Expand Up @@ -61,7 +61,7 @@ function socketDirName() {
*/
function createSocketDir() {
try {
const dir = socketDirName();
const dir = process.env.NX_DAEMON_SOCKET_DIR ?? socketDirName();
ensureDirSync(dir);
return dir;
} catch (e) {
Expand Down

0 comments on commit cd7f3df

Please sign in to comment.