Skip to content

Commit

Permalink
Revert "(langmodule) resolve interpreter relative to pm2 install folder
Browse files Browse the repository at this point in the history
#2675"

This reverts commit 3b15359.
  • Loading branch information
vmarchaud committed Feb 3, 2017
1 parent 9298ce9 commit 5ab386f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/API/Modules/Modularizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ function uninstallModule(CLI, module_name, cb) {
}

function installLangModule(module_name, cb) {
var node_module_path = path.resolve(path.join(__dirname, '../../../'));
var install_instance = spawn(cst.IS_WINDOWS ? 'npm.cmd' : 'npm', [
'install', module_name, '--prefix', cst.PM2_INSTALL_PATH, '--loglevel=error'
'install', module_name, '--prefix', node_module_path, '--loglevel=error'
],{
stdio : 'inherit',
env: process.env,
Expand Down
6 changes: 3 additions & 3 deletions lib/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,15 @@ Common.sink.resolveInterpreter = function(app) {
* Specific installed JS transpilers
*/
if (app.exec_interpreter == 'ts-node') {
app.exec_interpreter = path.join(cst.PM2_INSTALL_PATH, 'node_modules/.bin/ts-node');
app.exec_interpreter = path.join(__dirname, '../node_modules/.bin/ts-node');
}

if (app.exec_interpreter == 'lsc') {
app.exec_interpreter = path.join(cst.PM2_INSTALL_PATH, 'node_modules/.bin/lsc');
app.exec_interpreter = path.join(__dirname, '../node_modules/.bin/lsc');
}

if (app.exec_interpreter == 'coffee') {
app.exec_interpreter = path.join(cst.PM2_INSTALL_PATH, 'node_modules/.bin/coffee');
app.exec_interpreter = path.join(__dirname, '../node_modules/.bin/coffee');
}

if (app.exec_interpreter != 'none' && shelljs.which(app.exec_interpreter) == null) {
Expand Down
4 changes: 1 addition & 3 deletions paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ module.exports = function(PM2_HOME) {
PM2_HOME : PM2_HOME,
PM2_ROOT_PATH : PM2_HOME,

PM2_INSTALL_PATH : p.resolve('.'),

PM2_CONF_FILE : p.join(PM2_HOME, 'conf.js'),
PM2_MODULE_CONF_FILE : p.join(PM2_HOME, 'module_conf.json'),

Expand All @@ -63,6 +61,6 @@ module.exports = function(PM2_HOME) {
pm2_file_stucture.DAEMON_PUB_PORT = '\\\\.\\pipe\\pub.sock';
pm2_file_stucture.INTERACTOR_RPC_PORT = '\\\\.\\pipe\\interactor.sock';
}

return pm2_file_stucture;
};

0 comments on commit 5ab386f

Please sign in to comment.