diff --git a/paths.js b/paths.js index b1e83823c..645aa7dde 100644 --- a/paths.js +++ b/paths.js @@ -70,6 +70,14 @@ module.exports = function(PM2_HOME) { BUILTIN_NPM_PATH : has_node_embedded === true ? p.resolve(__dirname, './node/bin/npm') : null, }; + if (process.platform === 'win32' || + process.platform === 'win64') { + //@todo instead of static unique rpc/pub file custom with PM2_HOME or UID + pm2_file_stucture.DAEMON_RPC_PORT = '\\\\.\\pipe\\rpc.sock'; + pm2_file_stucture.DAEMON_PUB_PORT = '\\\\.\\pipe\\pub.sock'; + pm2_file_stucture.INTERACTOR_RPC_PORT = '\\\\.\\pipe\\interactor.sock'; + }; + // allow overide of file paths via environnement var paths = Object.keys(pm2_file_stucture); paths.forEach(function (key) { @@ -79,13 +87,5 @@ module.exports = function(PM2_HOME) { } }); - if (process.platform === 'win32' || - process.platform === 'win64') { - //@todo instead of static unique rpc/pub file custom with PM2_HOME or UID - pm2_file_stucture.DAEMON_RPC_PORT = '\\\\.\\pipe\\rpc.sock'; - pm2_file_stucture.DAEMON_PUB_PORT = '\\\\.\\pipe\\pub.sock'; - pm2_file_stucture.INTERACTOR_RPC_PORT = '\\\\.\\pipe\\interactor.sock'; - } - return pm2_file_stucture; };