File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ tar -xzf pack.tgz --strip 1
13
13
rm -rf pack.tgz
14
14
npm install npm --save
15
15
npm install --production
16
+ sed -i ' 1iconst PKG_INSTALL=true;' paths.js
16
17
cd ..
17
18
18
19
# First run that print a banner
Original file line number Diff line number Diff line change
1
+ const PKG_INSTALL = false ;
1
2
2
3
/**
3
4
* Copyright 2013 the PM2 project authors. All rights reserved.
@@ -11,7 +12,9 @@ var p = require('path');
11
12
function getDefaultPM2Home ( ) {
12
13
var PM2_ROOT_PATH ;
13
14
14
- if ( process . env . PM2_HOME )
15
+ if ( PKG_INSTALL === true && ! process . env . PM2_HOME )
16
+ PM2_ROOT_PATH = p . resolve ( '/etc' , 'pm2' ) ;
17
+ else if ( process . env . PM2_HOME )
15
18
PM2_ROOT_PATH = process . env . PM2_HOME ;
16
19
else if ( process . env . HOME && ! process . env . HOMEPATH )
17
20
PM2_ROOT_PATH = p . resolve ( process . env . HOME , '.pm2' ) ;
You can’t perform that action at this time.
0 commit comments